Sum all answers from structured array field
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi,
I'm trying to sum all values from one field of a structured array:
(X(k(1:end)).NumberSamples)
ans =
3692
ans =
3420
ans =
2470
ans =
3382
I want to add these values together, however I can't use
sum(X(k(1:end)).NumberSamples)
Is there a way around this that sums the answers from the original input (X(k(1:end)).NumberSamples)?
Thanks
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!