How to display vector elements in a structure field?
이전 댓글 표시
Hello,
I have a bigginer's question that might be simple. But I can't figure out how to display the vector that is saved into my structure. When I type my structure in the command window, I get the fields and their values. However, some of my fields contain a vector and only display by their size. The only way to display the values in the vector is if I type out.TotDef, however is there a way to have it display automatically?
Here is my command window:
out =
struct with fields:
UncMDef: [0 0.001125000000000 0.001800000000000 0.002700000000000]
UncLoad: [0 600000 600000 900000]
React0: 5.769230769230769e+05
React1: 3.230769230769231e+05
TotLoad: [1×4 double]
Stress: [1×4 double]
TotDef: [1×4 double]
I have a beginner's question that might be simple. But I can't figure out how to display the vector that is saved into my structure. When I type my structure in the command window, I get the fields and their values. However, some of my fields contain a vector and only display their size. The only way to display the values in the vector is if I type out.TotDef for example, however is there a way to have it display automatically? How come my top two structure fields show their elements in the vector?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!