I have a 2d matrix called myval. Its size is 21x11.
What I want to do is plot only the first 11 rows and all columns i.e 11x11. So I use a bar3 function in matlab to do this which gives me a good plot.
Now the z axis is the actual value stored in myval matrix. But it so happens that I want the x and y axis values (which represent the corresponding row and column) to start at 0 instead. That is value of (1,1) will be (0,0) and value at (1,2) will be (0,1). I do not want to change the actual value in the myval matrix. I just want to shift the axis.
this is my actual code
bar3(myval(1:t,:));
xlim([0 p]);
ylim([0 t]);
zlim([0 1);
set(gca,'fontsize',16);
set(gca,'XTick',(0:2:p));
set(gca,'YTick',0:2:t);
set(gca,'ZTick',0:1);