Re: 3D plot of z = (Matlab)
Quote:
Originally Posted by
SyNtHeSiS
However the surface which it produced does not look like an elliptic paraboloid (please refer to the attachment). (Speechless)
It does show an elliptic paraboloid. However you've only plotted a single quadrant of it. Create a meshgrid that spans from -5 to 5 and you'll get the picture that you're looking for.
2 Attachment(s)
Re: 3D plot of z = x^2 + y^2 (Matlab)
Thanks. Why is it that the elliptic paraboloid in Matlab is different to the standard one? (please refer to the attachments).
Re: 3D plot of z = x^2 + y^2 (Matlab)
Quote:
Originally Posted by
SyNtHeSiS
Thanks. Why is it that the elliptic paraboloid in Matlab is different to the standard one? (please refer to the attachments).
Could you elaborate? Which difference do you mean?
Re: 3D plot of z = x^2 + y^2 (Matlab)
Quote:
Originally Posted by
corsica
Could you elaborate? Which difference do you mean?
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:
Code:
>> [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);
CB