function G=Gaussfunc(x,mu,sigma) if ~exist('mu','var') mu=0; sigma=1; end G=1/(sqrt(2*pi)*sigma)*exp(-x.^2/(2*sigma^2));