plot 3d - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# plot 3d

Posts: 1Member
can we plot this in 3d
i tried surf but i couldnt draw it.
[img=http://s10.postimage.org/6pyfbh98p/function.jpg]

i solved this question. i found at google isosurface function. its for 3d plot.

for axises i used daspect([1 1 1]) and it worked fbetter i think ^^ thank you all for help.

clear all
close all
syms X Y Z V
[X,Y,Z] = meshgrid(linspace(-3,3,25));
V = (X.^2+9*Y.^2/4+Z.^2-1).^3 - X.^2.*Z.^3
fv=isosurface(X,Y,Z,V,0)
fv = isosurface(V,0)
fvc = isosurface(V,'red')
p = patch(isosurface(X,Y,Z,V,-0))
isonormals(X,Y,Z,V,p)
set(p,'FaceColor','red','EdgeColor','none');
daspect([1 1 1])
view(3);
axis tight
camlight
and the result is good. to see results: [img=http://s15.postimage.org/nb4pyscrv/kalp.jpg]