function result = gauss_beam1D(x0, xdata) % x0(1) = offset % x0(2) = amplitude % x0(3) = x centroid location % x0(4) = x width result = x0(1) + x0(2).*exp(-2.0.*( ... ((xdata - x0(3)).^2)/(x0(4).^2)));