I created an array of structures
data(1).field = 5;
data(2).field = 3;
data(3).field = -4;
...
I would like to plot one of the fields by accessing something like:
data(:).field
I get the following error:
Expected one output from a curly brace or dot indexing expression, but there were 1000 results.
Is it possible to get the data without using a loop?
try
getfieldlike this
getfieldreads nested fields, as inthen the call is
complete MATLAB help file here:
https://uk.mathworks.com/help/matlab/ref/getfield.html