How to display vector elements in a structure field?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Scope Variables and Generate Names in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!