I'm trying to visualize some 4-D data using matlab's slice tool. But because the array is 4x4x4, i would like to visualize it by slicing at all levels.
I use the following code to generate a plot:
data=round(rand(4,4,4));
h=slice(data,1:4,1:4,1:4);
set(h,'FaceAlpha',0.3,'EdgeAlpha',1)
colormap gray
But the plot ends up representing a 3x3x3 array.
So it looks like matlab is interpolating some values. I've searched around to no avail -- how can i visualize the 4D data without interpolation (i.e., so each value in the array is represented by a cell in the figure)?