www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SizeofDimensionsin3DArrayExample.m

    %% Size of 3-D Array  

%% 
% Create a random 3-D array and find its size. 
A = rand(2,3,4);
sz = size(A) 

%% 
% Find only the length of the second dimension of |A|. 
szdim2 = size(A,2) 

%% 
% Assign the length of each dimension to a separate variable. 
[sz1,sz2,sz3] = size(A)