I tried drawing an elliptic paraboloid ( ) in Matlab with the following code:
>> [x y] = meshgrid(0 : 5);
>> z = x.^2 + y.^2;
However the surface which it produced does not look like an elliptic paraboloid (please refer to the attachment).
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);