Can anyone please check my codes? the figure doesn't show up!!!!
Show older comments
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
More Answers (0)
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!