How to add values in the array in matlab?

조회 수: 3 (최근 30일)
swati mane
swati mane 2019년 11월 13일
답변: KSSV 2019년 11월 13일
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.

답변 (1개)

KSSV
KSSV 2019년 11월 13일
Read about sum
D = rand(11,1) ;
thesum = sum(D)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by