Subplots of multidimensional arrays in Matlab
Posted
by altes4ia
on Stack Overflow
See other posts from Stack Overflow
or by altes4ia
Published on 2010-05-06T10:04:36Z
Indexed on
2010/05/06
10:08 UTC
Read the original article
Hit count: 134
multidimensional-array
|matlab
I have a 10x10x10 array, z. How do I plot everything in the SAME window so that I would have the 3 plots for z(:,:,1) and below it the three plots for z(:,:,2) etc ?
This is what I have so far:
for i = 1:10
z=z(:,:,i);
figure(i)
subplot(1,2,1)
surf(z)
%code, obtain new array called "new1"...
subplot(1,2,2)
surf(new1)
%code, obtain new array called "new2"...
subplot(1,3,3)
surf(new2)
end;
© Stack Overflow or respective owner