Field of a structure
조회 수: 1 (최근 30일)
이전 댓글 표시
As Stephen Cobeldick helped me yesterday, I have a structure T consisting of 4 fields. I want to calculate the mean of each field in T.. Then I want all them to be written in an excel file. Thnx..
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/357685/image.jpeg)
채택된 답변
추가 답변 (1개)
madhan ravi
2020년 9월 8일
D = structfun(@mean, T);
writetable(table(D), 'Sample.xlsx') % or writematrix() as Stephen suggested
댓글 수: 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!