how to do sum up elements one by one (sequence addition)

1 visualización (últimos 30 días)
vivek r
vivek r el 8 de En. de 2017
Respondida: Roger Stafford el 9 de En. de 2017
[1 2 3 4] to [1 3 6 10] i.e 1=1 ; 1+2=3; 1+2+3=6; so on

Respuestas (2)

halleyhit
halleyhit el 8 de En. de 2017
just a hint: [1 3 6 10]'=[1 1 1 1;0 1 1 1; 0 0 1 1; 0 0 0 1]*[1 2 3 4]'

Roger Stafford
Roger Stafford el 9 de En. de 2017
cumsum([1 2 3 4]) equals [1 3 6 10]

Categorías

Más información sobre Elementary Math en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by