Hey guys,
I have a 1x400 struct, wherein this struct is a field called 'BO', this field called 'BO' contains a struct, which in themselves is a field called 'circles' that ranges from 1:20 rows (they're all different values). How can I access the standard deviation of each of those circle fields? Do I apply a cell conversion or is it possible to leave the data like this?
Thanks!

 채택된 답변

Bruno Luong
Bruno Luong 2020년 8월 12일

1 개 추천

arrayfun(@(s) std(s.BO.circle), structarray)

추가 답변 (1개)

Walter Roberson
Walter Roberson 2020년 8월 12일

1 개 추천

cellfun(@(S) std(S.circles), {YourStruct.BO})
This assumes that each BO field is a scalar struct, and that when you say that it has a number of different rows, that each row has exactly one column.

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

태그

질문:

2020년 8월 12일

댓글:

2020년 8월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by