write;
F = @(lambda,xdata,Ralpha,r,beta,sigma) Ralpha +((1-exp(-beta*xdata))/(beta*xdata))*(r-Ralpha)+...
((sigma.^2)/(4*(beta.^3)*xdata)*((1-exp(-xdata)).^2));
This way you are saying, F is a function of lambda, xdata, Ralpha, etc.
i have do it and i have run the program but i get the...