Annotated Matlab diary
for generating these plots.
Load the files and reshape the matrices
>> cd Na24
>> ls
ans =
1.jpg
2.jpg
3.jpg
4.jpg
5.jpg
6way.jpg
6wayplot.ps
Na24.grd
Na24noH.grd
na
nalog
nalogold
naorg
tf1.jpg
>> load naorg
>> naorg_sq24 = reshape(naorg',140,140);
>> surf(naorg_sq24)
>> cd ..
>> ls
ans =
Na24
Na32
sub
>> cd Na32
>> ls
ans =
Na32.grd
na32
na32.jpg
na32surfl.jpg
na32surflclipped.jpg
>> load na32
>> size(na32)
ans =
4900 4
>> naorg_sq32 = reshape(na32',140,140);
>> xstep = (4.75- -4.75)/139
xstep =
0.0683
>> x = [-4.75:xstep:4.75];
>> size(x)
ans =
1 140
>> y = x;
Make the surface plot figure
Na24 electron density surface
>> subplot(3,1,1)
>> surfl(x,y,naorg_sq24);
>> shading interp
>> colormap pink
>> title('Na24 electron density')
>> xlabel('distance, angstrom'),ylabel('distance, angstrom'),zlabel('e^-/angstrom^3')
Na32 electron density surface
>> subplot(3,1,2)
>> surfl(x,y,naorg_sq32);
>> shading interp
>> colormap pink
>> title('Na32 electron density')
>> xlabel('distance, angstrom'),ylabel('distance, angstrom'),zlabel('e^-/angstrom^3')
Na24 - Na32 electron density surface
Here is the operation to subtract the one density matrix from the other:
>> naorg_diff=(naorg_sq24-naorg_sq32);
Plot it:
>> subplot(3,1,3)
>> surfl(x,y,naorg_diff)
>> shading interp
>> title('Na24 - Na32 electron density difference')
>> xlabel('distance, angstrom'),ylabel('distance, angstrom'),zlabel('e^-/angstrom^3')
Make the contour plot figure
Plot the contours from 0 to 0.5 electrons/angstrom^3.
>> v = (0:0.1:0.5);
Na24 electron density contour
>> subplot(3,1,1)
>> contour(x,y,naorg_sq24,v)
>> axis square
>> title('Na24 electron density')
>> xlabel('distance, angstrom'),ylabel('distance, angstrom')
>> colormap jet
Na32 electron density contour
>> subplot(3,1,2)
>> contour(x,y,naorg_sq32,v)
>> axis square
>> title('Na32 electron density')
>> xlabel('distance, angstrom'),ylabel('distance, angstrom')
Na24 - Na32 electron density contours
Plot the contours from -0.5 to 0.5 electrons/angstrom^3.
>> vv = (-.5:.01:0.5);
>> subplot(3,1,3)
>> contour(x,y,naorg_diff,vv)
>> axis square
>> title('Na24 - Na32 electron density difference')
>> xlabel('distance, angstrom'),ylabel('distance, angstrom')
Pages maintained by
Prof. Ramón Arrowsmith
Last modified November 18, 1999