I have that matrix
p=[4 9 3 3 6 8 8 12 6]
and i want to reach that one
k=[4 13 16 19 25 33 41 53 59]
I made with for loop but is seems like
k=[13 16 19 25 33 41 53 59 ]
how can i fix it?

 Respuesta aceptada

Stephen23
Stephen23 el 29 de Mayo de 2019
Editada: Stephen23 el 29 de Mayo de 2019

1 voto

>> k = cumsum(p)
k =
4 13 16 19 25 33 41 53 59

Más respuestas (1)

Categorías

Etiquetas

Preguntada:

el 29 de Mayo de 2019

Respondida:

ES
el 29 de Mayo de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by