function out=gauss(ampl,sigma,wave,wave0) % Syntax: out=gauss(ampl,sigma,wave,wave0) % where wave is a vector, % ampl is a scalar denoting the 'amplitude' of the Gaussian, % sigma is a scalar denoting the FWHM of the Gaussian, and % wave0 is the centre position of the Gaussian. % out is a output vector of the same dimension as wave. % % This function returns a Gaussian vector with the parameters % given by the input. out=ampl/sigma * exp(-((wave-wave0)/sigma).^2/2);