%% Return Multiple Output Arrays
% Create a scalar structure.

S.f1 = 1:10;
S.f2 = [2 3; 4 5; 6 7];
S.f3 = rand(4,4)

%
% Calculate the sizes of each array in S. The number of rows and columns are each in 3-by-1 numeric arrays.

[nrows,ncols] = structfun(@size,S)

% Copyright 2012 The MathWorks, Inc.