Professional Documents
Culture Documents
Y R y R R: 100 940 197.3 1 2 2 1 3 2 'Enter The Value of B' 'Enter Value of N' 1 1 10 0 1 1 2 1 1 1 1 1 1
Y R y R R: 100 940 197.3 1 2 2 1 3 2 'Enter The Value of B' 'Enter Value of N' 1 1 10 0 1 1 2 1 1 1 1 1 1
clc
clf
k=100
m=940
hc=197.3
function y=v(r)
y=(1/2)*k*((r)^2)+(1/3)*b*((r)^2)
endfunction
b=input('enter the value of b')
n=input('enter value of n')
H=zeros(n-1,n-1)
h=10/n;
r=0
for i=1:n-1
r=r+h;
H(i,i)=2*(1+(m*v(r)*h*h)/(hc*hc));
if i<(n-1) then
H(i,i+1)=-1
H(i+1,i)=-1
end
end
disp('hermition polynomial H')
disp(H(1:5,1:5))
[a,b]=spec(H)
r=linspace(h,10,n-1)
disp('eigenvalue')
disp(b(1:5))
E=b*hc*hc/(2*h*h*m)
disp('energy E')
disp(E(1:5))
disp('eigenvector')
disp(a(1:5,1:5))
u=a(:,1)*hc*hc/(2*h*h*m);
d=u'./r
plot(r,d)
xlabel('position')
ylabel('energy')
xtitle('graph between energy and position')
hermition polynomial H
2.0000062 - 1. 0. 0. 0.
- 1. 2.0000247 - 1. 0. 0.
0. - 1. 2.0000556 - 1. 0.
0. 0. - 1. 2.0000989 - 1.
0. 0. 0. - 1. 2.0001545
eigenvalue
0.0074570
0.
0.
0.
0.
energy E
96.50324
0.
0.
0.
0.
eigenvector
graph
2nd STATE B= 10
2.0000066 - 1. 0. 0. 0.
- 1. 2.0000264 - 1. 0. 0.
0. - 1. 2.0000593 - 1. 0.
0. 0. - 1. 2.0001055 - 1.
0. 0. 0. - 1. 2.0001648
eigenvalue
0.0077015
0.
0.
0.
0.
energy E
99.66727
0.
0.
0.
0.
eigenvector
- 0.0171230 - 0.0209494 0.0233977 0.0252459 - 0.0267492
- 0.0341143 - 0.0415227 0.0461352 0.0495207 - 0.0521954
- 0.0508438 - 0.0613511 0.0675719 0.0718916 - 0.0751004
- 0.0671847 - 0.0800809 0.0871057 0.0915011 - 0.0943513
- 0.0830152 - 0.0973806 0.1041904 0.1076001 - 0.1090159
GRAPH
3RD SET
B= 30