nlinfit Options - how to set them?
10 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
採用された回答
Matt Tearle
2011 年 2 月 21 日
doc statset
statset is a function that will create a structure variable of options; you then pass this structure into nlinfit:
opts = statset('MaxIter',600);
fit = nlinfit(xdata,ydata,f,c,opts)
opts is the structure variable.
0 件のコメント
その他の回答 (2 件)
Robert Cumming
2011 年 2 月 21 日
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.
0 件のコメント
Dave
2012 年 2 月 3 日
Before your call to 'nlinfit' do this: options = statset('nlinfit'); options.MaxIter = 1000;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!