%% 可以
% 例子
for i = 1:2 for j = 1:3 for m = 1:4 x(i,j,m) = i+j+m; end endend
x
x(:,:,1) =
3 4 5
4 5 6
x(:,:,2) =
5 6 7
x(:,:,3) =
6 7 8
x(:,:,4) =
7 8 9