MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

If a particular field contains a cell array, use curly braces to access the data, such as
S.cellField{1:50,1:80}.


Data in Nonscalar Structure Arrays


Create a nonscalar array by loading data from the file mandrill.mat into a second
element of array S:


S(2) = load('mandrill.mat')


Each element of a structure array must have the same fields. Both clown.mat and
mandrill.mat contain variables X, map, and caption.


S is a 1-by-2 array.


Access Data in a Structure Array
Free download pdf