nlinfit Options - how to set them?
Show older comments
I want to change the max iterations for nlinfit, as usual the mathworks docs are totally unhelpful by saying
'[...] = nlinfit(X,y,fun,beta0,options) specifies control parameters for the algorithm used in nlinfit. options is a structure created by a call to statset'
so obvoiusly
cfit = nlinfit(xdata,ydata,f,c, MaxIter=600)
does not work, as I have to make a 'call to statset' whatever that means! It does not explain how to do this or provide an example of how this is done.
So how do I change the Max iterations?
Accepted Answer
More Answers (2)
Robert Cumming
on 21 Feb 2011
0 votes
You need to put it as a field in a structure:
options.MaxIter = 600
cfit = nlinfit(xdata,ydata,f,c, options)
see help nlinfit for list of options.
Dave
on 3 Feb 2012
0 votes
Before your call to 'nlinfit' do this: options = statset('nlinfit'); options.MaxIter = 1000;
Categories
Find more on Probability Distributions and Hypothesis Tests 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!