% % Plot the antisymmetric wavefunction % of 2 1-dimensional Harm. Osc. % % stateA = exp(-X.^2/2) % % stateB = X. * exp(-X.^2/2) % % exp(-X.^2/2) Ground State % X.*exp(-X.^2/2) Excited negative parity close all,clear all colmap= [0.7 0 0;1 0.2 0.2;0.7 0.5 0.3;0.7 0.7 0.3; ... 0.8 0.8 0.5;1 1 1;0.5 0.8 0.8;0.3 0.7 0.7;0.3 0.5 0.7;... 0.2 0.2 0.7;0 0 0.7];colmap=flipud(colmap); rangeX=3; x1=-rangeX:0.02:rangeX; x2=-rangeX:0.02:rangeX; [X1,X2 ]=meshgrid(x1,x2); % first the unsymmetrized fig1=figure(1);set(fig1,'color','white'); Psi = exp(-X1.^2/2).*( X2.*exp(-X2.^2/2) ); surf(x1,x2,rangeX*Psi);axis equal; colormap(colmap);colorbar;hold on; shading interp ; rotate3d; zz=contour3(x1,x2,rangeX*Psi,25,'k-'); title('Product Wavefunction') fig2=figure(2);set(fig2,'color','white'); Psi = exp(-X1.^2/2).*( X2.*exp(-X2.^2/2) ) - ... exp(-X2.^2/2).*( X1.*exp(-X1.^2/2) ); surf(x1,x2,rangeX*Psi);axis equal; colormap(colmap);colorbar;hold on; shading interp ; rotate3d; zz=contour3(x1,x2,rangeX*Psi,25,'k-'); title('Antisymmetric Wavefunction') fig3=figure(3);set(fig3,'color','white'); Psi = exp(-X1.^2/2).*( X2.*exp(-X2.^2/2) ) + ... exp(-X2.^2/2).*( X1.*exp(-X1.^2/2) ); surf(x1,x2,rangeX*Psi);axis equal; colormap(colmap);colorbar;hold on; shading interp ; rotate3d; zz=contour3(x1,x2,rangeX*Psi,25,'k-'); title('Symmetric Wavefunction')