I tried drawing an elliptic paraboloid ( ) in Matlab with the following code:
>> [x y] = meshgrid(0 : 5);
>> z = x.^2 + y.^2;
>> surf(z);
However the surface which it produced does not look like an elliptic paraboloid (please refer to the attachment).
I think he is petrubed by the square in the x-y plane that the surface is plotted above giving the plotted part of the surface peaks at the corners rather than the circular form of the top edge of the plotted part of the surface in the second plot.
try something like:
CBCode:>> [r,the]=meshgrid([0:0.1:5],[0:pi/10:2*pi]); >> x=r.*cos(the); >> y=r.*sin(the); >> z=x.^2+y.^2; >> surf(x,y,z);