Comparison of the gaussfit function (coordinate transformation and polynomial least squares) vs iterative leastsqsuares, for measuring two overlapping peaks. Performed by the Matlab/Octave script OverlappingPeaks.m gaussfit method, applied separately to two peaks. % Parameter errors: Position Height Width Peak 1: -0.07852 -0.22389 -0.31298 Peak 2: 0.44642 -2.9054 -2.2583 Elapsed time, seconds: 0.018418 Iterative curve fitting method, using peakfit.m, measures both peaks together P=peakfit([x;y],0,0,2,1) % Parameter errors: Position Height Width Peak 1: -0.0017687 0.046957 -0.029539 Peak 2: 0.019648 0.19036 -0.13133 Elapsed time, seconds: 0.087599