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

1 view (last 30 days)
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

Accepted Answer

Thorsten
Thorsten on 12 Oct 2015
Edited: Thorsten on 12 Oct 2015
Try without an explicit isovalue
isosurface(x,y,z,wavefn)

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!