3D plot problem

2.1k Views Asked by At

I have a matrix $(A_{10*10})$ in which each elements of matrix states the value of the function $y=f(x,y)$. Since, $y$ shows the enclosed area between two squares, so I don't have the value of these elements in this area. Now my question is that how can I plot the $y$ in termes of $x,y$ in 2D or 3D using matlab while I don't have the values of $y$ in $A(3:5,3:5)$? Thank you in advance.

1

There are 1 best solutions below

0
On

put your data instead of A matrice

 A=rand(10,10);
 h = bar3(A);
 colormap jet
 colorbar

for change in color you can use this code :

 shading interp
 for i = 1:length(h)
     zdata = get(h(i),'ZData');
     set(h(i),'CData',zdata)
     set(h,'EdgeColor','k') 
 end

enter image description here