MATLAB Answers

How to add values in the array in matlab?

조회 수: 2(최근 30일)
swati mane
swati mane 13 Nov 2019
Answered: KSSV 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.

  댓글 수: 0

로그인 to comment.

답변 수 (1)

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

  댓글 수: 0

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by