How to add values in the array in matlab?

3 Ansichten (letzte 30 Tage)
swati mane
swati mane am 13 Nov. 2019
Beantwortet: KSSV am 13 Nov. 2019
I have an array with eleven elements in a single column. I want to add all these elements.
I have,
D=regionprops(L2,'area')
In array D, I have all values of area. I want to add all the values in D.
Please guide me. Thanks in advance.

Antworten (1)

KSSV
KSSV am 13 Nov. 2019
Read about sum
D = rand(11,1) ;
thesum = sum(D)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by