lsqcurvefit() moved from Matlab to toolbox?

5 views (last 30 days)
Jeff
Jeff on 1 Jun 2023
Answered: John D'Errico on 1 Jun 2023
Hi all - do I misremember that lsqcurvefit() used to be a core matlab function? I've not used it in a few releases and was just surprised to find I need a toolbox for basic nonlinear fitting. Just testing my memory here.
  1 Comment
Rik
Rik on 1 Jun 2023
I haven't checked, but not to my recollection. I believe you always needed fminsearch for things \ can't handle. But after I check I may turn out to be wrong. Do you have a range of releases you expect this change (if it is a change) to have occurred?

Sign in to comment.

Answers (2)

Star Strider
Star Strider on 1 Jun 2023
The lsqucurvefit function has always been in the Optimization Toolbox for as long as I’ve been using MATLAB. You may be referring to fminsearch that is both a basic MATLAB function and in the Optimization Toolbox. You can certainly do nonlinear fitting with it.

John D'Errico
John D'Errico on 1 Jun 2023
You definitely mis-remember this. lsqcurvefit has always been in the optimization toolbox. At least as long as I can recall on this, and my MATLAB memory goes back a long way.
Perhaps in an older release you had, perhaps from an employer, in a galaxy far far away, you may have had that toolbox so you just assumed it was part of MATLAB. But lsqcurvefit has always been where it it now, in the optimization toolbox.
Or, perhaps you are thinking of lsqnonneg. I'm pretty sure that lives in MATLAB proper, not provided with the optimization toolbox. (Although lsqnonneg is listed as part of the optimization toolbox.)

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!