function res=f(x)
e=x;
xd=3.23;
dx=0.01;
res=psid(e,xd+dx)-psid(e,x-dx)-psig(e,xd+dx)+psig(e,xd-dx);
res=res/psid(e,dx);


--------------------------------

clear
hold on
g=inline('her(x,4)');


for x=-5:0.01:5
    r=her(x,5);
    n=r*exp(-x*x/2);
    plot(x,n);
end

fzero(g,3);

hold off

---------------------------------------------------

function res=her(x,j)

if(j)==0
    res=0;
else
    if(j)==1
        res=1/pi^0.25;
    else
        res=x*sqrt(2/j)*her(x,j-1)-sqrt((j-1)/j)*her(x,j-2);
    end
endff=inline('f(e)');
fzero(ff,2)

--------------------------------

function res=psid(e,xfin)
xmin=-9.00;
y0=[0 1e-6 e];
[x,y]=ode23('syst',[xmin xfin],y0);
plot(x,y)
res=y(length(y));
----------------------------------
function res=psig(e,xfin)
xmin=9.00;
y0=[0 1e-6 e];
[x,y]=ode23('syst',[xmin xfin],y0);
plot(x,y)
res=y(length(y));
-------------------------------------------
function res1=syst(x,y)
e=y(3);
res(3)=0.0;
res(1)=y(2);
res(2)=2*(v(x)-e)*y(1);
res1=res';

------------------------------
function res=v(x)
res=0.5*x*x;
