我有一個10x10x10陣列,z
。我如何在SAME窗口中繪製所有的東西,這樣我就可以得到z(:,:,1)
的3個地塊,在它下面的z(:,:,2)
等三個地塊。Matlab中的多維數組的子陣列
這是我到目前爲止有:
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;
我不認爲保持在這種情況下,必要的 - 繪製在不同的子圖將不會覆蓋先前的子圖。但是如果在每個子圖中繪製了多於一個的曲面,那就是了。仍然是+1來捕捉錯誤。 – Kena 2010-05-06 19:38:12