Trouble with nonlinear curve fitting functions
I am moving some calculations from Octave (open-source MATLAB clone) for Prime 7.0. One of the calculations involves fitting a double exponential pulse to measured data. In Octave/MATLAB I use the lsqcurvefit function, which executes very quickly and appears to give me reasonable answers.
I am trying to find an equivalent function in MathCAD Prime. I tried genfit and LeastSquaresFit - for genfit I get a regression not converging error, for LeastSquaresFit I get a floating point error. I even tried using the output of my MATLAB calculation as the guess value and still get these errors.
Here is a screenshot showing the function I am trying to fit, the guess value (which is the output from MATLAB), and a plot of the data and the fitting function using the guess value.
I assume I am doing something fundamentally wrong here. In MATLAB I can start with a guess value wildly in error and still get an answer.


