Can anyone please check my codes? the figure doesn't show up!!!!

function plotisosurfaces(d)
a0 = 0.529;
[x, y, z] = meshgrid(-2:.2:2,-2:.2:2,-2:.2:2);
r = sqrt(x.^2+y.^2+z.^2);
a1 = abs(r+0.5*d)./a0;
a2 = abs(r-0.5*d)./a0;
ha = (1/(pi*a0))^(3/2).*exp(-a1);
hb = (1/(pi*a0))^(3/2).*exp(-a2);
psi =(1/(sqrt(2)))* (ha + hb);
psistar =(1/(sqrt(2)))* (hb - ha);
wavefn = psi.*psistar;
isosurface(x,y,z,wavefn,0.3)
daspect([1 1 1]);
view(3);
axis vis3d;
camlight;
lighting phong;
end

 Akzeptierte Antwort

Thorsten
Thorsten am 12 Okt. 2015
Bearbeitet: Thorsten am 12 Okt. 2015
Try without an explicit isovalue
isosurface(x,y,z,wavefn)

Weitere Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by