Borrar filtros
Borrar filtros

array element sum wih condition

3 visualizaciones (últimos 30 días)
Tomas
Tomas el 28 de Abr. de 2012
Hello,guys and girls, i have a situation:
F=[5, 4, 3, 2, 1];
I would like to sum matrix elements in order like this:
5
5+4
5+4+3
5+4+3+2
5+4+3+2+1
Do you have any ideas?

Respuesta aceptada

per isakson
per isakson el 28 de Abr. de 2012
Try the function, CUMSUM

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices 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