function I=gsbeam(x,xdat) I=pi/4*x(1)*x(3)^2*erfc(sqrt(2)*(x(2)-xdat)/x(3)); end