
% radialfunctions.m
% radial functions for hydrogenic atom, n=3 l=0,2
   close all; clear all;
sqrtx=0.1 : 0.1 :sqrt(30);
x=sqrtx.^2;
N=length(x);
null=zeros(1,N);
fullscreen = get(0,'ScreenSize');
% fullscreen is a matrix. fullscreen(1,2) are the pixel coordinates of the lower left corner, 
% fullscreen(3) is the width, fullscreen(4) is the height, all in pixels 

figure('Position',[0 0 0.6*fullscreen(3) 0.8*fullscreen(4)])  % determines the position and size on the screen
V= -2./x;
V1=V+2./x.^2;
V2=V+6./x.^2;
V3=V+12./x.^2;
hold on
p=plot(x,V,x,V1,x,V2,x,V3,x,null);
R30=0.4*x.*(1-2.*x/3+2.*x.^2/27).*exp(-x./3);
R32=0.01*x.^3.*exp(-x./3);
plot(x,R30,x,R32);
E2=-ones(1,N)/4; E3=-ones(1,N)/9; E4=-ones(1,N)/16;
plot(x,E2,x,E3,x,E4);
%xlabel('r/a');
axis([0 30 -0.7 0.7]); 
set(gca, 'FontSize', 20) % or size to suit
%h=xlabel('r/a') %or h=get(gca,'xlabel')
%set(h, 'FontSize', 60) 
%set(h,'FontWeight','bold') %bold font
t1=  text(10,0.38,'u_a');
t2= text(15,0.33,'u_b');
set(t2,'FontSize',20);
set(t1,'FontSize',20);
t3=text(14.3,-0.79,'r/a');
set(t3,'FontSize',25);
t4=text(7,-0.4,'Effective potentials and energies in units of $\hbar^2/(2ma^2)$');
t5=text(7,0.5,'Radial functions u(r) in arbitrary units');
set(t4,'FontSize',14);
set(t5,'FontSize',18);
text(3.5,-0.6,'1');text(2.4,-0.5,'2');text(2.5,0.3,'3');text(3.8,0.38,'4'); text(2,-0.24,'5'); text(8,-0.10,'6'); text(13,-0.05,'7');
hold off
print -dpng fig42159-10-22.png
