sum filed in struct
1 次查看(过去 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!