sum filed in struct
2 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Paul
2023 年 6 月 3 日
編集済み: Paul
2023 年 6 月 6 日
% example data
Sis.PV = 20;
% Sis.PV = repmat(Sis.PV,1,82); % original incorrect line, expanded the field instead of the struct
Sis = repmat(Sis,1,82); % correct line, expands the struct
Sis
sum([Sis.PV])
3 件のコメント
Paul
2023 年 6 月 3 日
Yes, I used []. Read the tutorial at the link I provided in the answer for more info. And/or search the doc for "comma-separated lists".
その他の回答 (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!