I'm plotting an n x 3 matrix which has temperature data, each of the indexes corresponds to location T(x,y,z). My problem is when I use slice it switches the x and y planes. The array is still stored correctly when points are called and the slices are in the right planes but instead of x extending to 72 it only goes to 24. I'm using Matlab 2012b if that makes any difference.
clear; clc;T=ones(72,24,72);T(50:60, :, :)=100; T(:, 18:22, :)=-25;figure; h= slice(T,[],[], 1);for id = 1:72 delete(h); h= slice(T,[],[], id); set(h,'edgecolor','none'); axis([0 72 0 24 0 72]); xlabel(' X axis'); ylabel(' Y axis'); zlabel(' Z axis'); colorbar; pause(0.01);end
Best Answer