levenberg-marquardt in lsqcurvefit
6 views (last 30 days)
Show older comments
Hello
How do I use the levenberg-marquandt algortime in lsqcurve fit instead of the default trust-region-reflective algorithm?
[parameters,resnorm,residual,exitflag,output] = lsqcurvefit(heightModel,initialValues,filteredData(:,1),filteredData(:,2));
is the formula I use in my function
Can anyone help me out?
Thanks in advance
Niels
0 Comments
Accepted Answer
Matt Kindig
on 15 Aug 2013
Pass in an options structure:
opts = optimset('Algorithm', 'levenberg-marquardt');
[parameters,resnorm,residual,exitflag,output] = lsqcurvefit(heightModel,initialValues,filteredData(:,1),filteredData(:,2),[],[],opts);
You can see the various options in the Help docs for lsqcurvefit, at
doc lsqcurvefit
0 Comments
More Answers (1)
See Also
Categories
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!