• No results found

% This script calculates the resonances for square-well potential with % additional barrier % Values

N/A
N/A
Protected

Academic year: 2021

Share "% This script calculates the resonances for square-well potential with % additional barrier % Values"

Copied!
1
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

% This script calculates the resonances for square-well potential with

% additional barrier

% Values clear all

[maxit,tol,R,Rmax,V0]=deal(200,1e-8,0.01:0.01:0.5,0.5,300);

% Functions syms E R1 m;

y(m,E,R1) = besselj(m,sqrt(E))*(sqrt(E-V0)*bessely(m,sqrt(E)*R1)*besselj(m-1,sqrt(E-V0)*R1)-sqrt (E)*besselj(m,sqrt(E-V0)*R1)*bessely(m-1,sqrt(E)*R1))-bessely(m,sqrt(E))*(sqrt(E-V0)*besselj(m,sqrt (E)*R1)*besselj(m-1,sqrt(E-V0)*R1)-sqrt(E)*besselj(m,sqrt(E-V0)*R1)*besselj(m-1,sqrt(E)*R1));

yprime(m,E,R1) = diff(y,E);

f = matlabFunction(y);

fprime = matlabFunction(yprime);

% Initial guess matrix

% This uses the besselzero script avaiable at http://nl.mathworks.com/matlabcentral/fileexchange/

submissions/6794/v/1/download/zip x=besselzero(0,40,1);

for m=1:1:20

x=[x,besselzero(m,40,1)];

end

% Perturb for better results x=x.^2-0.01-i/100;

disp('Made matrix, now solving.') for m=0:1:20 % Loop over m

for r=R % increase the new barrier for j=1:length(x) % for each zero

for i=1:maxit% iterate for some zero xold=x(j,m+1);

x(j,m+1)=x(j,m+1)-f(m,x(j,m+1),r)/fprime(m,x(j,m+1),r);

err=xold-x(j,m+1);

if abs(err)<tol break end; end; end; end; end

% Testing the found values test=1;

if test

disp('Now testing the values.') for m=0:1:20

for j=1:40

a=f(m,x(j,m+1),Rmax);

if abs(a)>1e-12;

warning('Too high') [a,x(j,m+1)]

break end; end; end; end

% Plotting the values plot=1;

if plot

disp('Making a plot.') figure

for m=0:1:20

y=real(x(:,m+1));

m_vec=m*ones(1,40);

scatter(m_vec,y,'filled');set(gca,'FontSize',15) hold on

scatter(-m_vec,y,'filled') end

axis([-20 20 0 500]) xlabel('m')

ylabel('E')

str=sprintf('Spectrum for R1=%f',Rmax);

title(str) scatter(0,V0) end

Referenties

GERELATEERDE DOCUMENTEN

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

For this is a novel that speaks incessantly of time, from the hour of the title, to the “prehistory of prehistory” (Lispector 1992, 11) of the novel’s opening passage, to the today,

Second, we apply the corrected approximations to develop refined square-root staffing rules for several constraint satisfaction problems with respect to these performance measures..

Furthermore the commands \iftotalfigures and \iftotaltables are offered for typesetting text only if the document contains figures resp. tables at

Van Raalte Wrote a Sermon for Presentation at the Annual National Day of Prayer for Crops and IndustryA. the Annual National Day of Prayer for Crops

Figure 5. Lunch with US Embassy Staff at Lucy’s Restaurant, Addis Ababa. a) Purchasing PV supplies in Addis Ababa. b) Meetings at Addis Ababa University... a) Brief meeting

We then define the magnitude of threat for each fish species in a given global warming scenario as the proportion of the geographic range of the species where projected extremes in

This inscription consists of 29 letters, 13 without repetition. Of these, 8 are written in square script. According to Macdonald’s classification, the letters l and n appear in