Hi, I am trying to plot a series of 2D matrices containing ones and zeros (effectively black and white images) in matlab, which are ordered in 3D.
The code I have so far is:
function PlotthreeD()
numrows = 100;
numcols = 100;
Plot1 = zeros(numcols);
Plot1(20:50,20:50) = 1;
Plot2 = zeros(numcols);
Plot1(20:70,20:90) = 1;
Plot3 = zeros(numcols);
Plot3(20:50,20:50) = 1;
B = cat(3, Plot1, Plot2, Plot3);
figure;
offset = 100;
hold on;
for i=1:3;
mesh(B(:,:,i)+offset*(i));
end
end
Is there a drawing command (rather than mesh) that will allow me show the 2D arrays as solid shapes (where the matrix elements equal 1), rather than having a these regions shown as being raised (as they are with mesh)?
Thanks in advance,
James