フィルターのクリア

Change the method of curve fitting in fitoptions

2 ビュー (過去 30 日間)
J.S.
J.S. 2018 年 7 月 19 日
編集済み: Matt J 2018 年 7 月 19 日
I am trying to fit a custom model to some data, and have tried to change the fitoptions of this model:
Off_Fit=fittype('a*exp(b*(x-x0))+c*exp(d*(x-x0))+y0','coefficients',{'a','b'...
'c','d','y0'},'problem',{'x0'},'independent','x');
Op=fitoptions(Off_Fit);
L=[...]; %Lower bounds
Op.Lower=L;
Op.Method='NearestInterpolant';
All changes except Op.Method are accepted by Matlab; when I try to use the line Op.Method=... above, I get the error
Changing the 'Method' property of curvefit.basefitoptions is not allowed.
Error in myScript (line 163)
Op.Method='NearestInterpolant';
Can someone tell me how I can change the fitting method? I was using https://www.mathworks.com/help/curvefit/fitoptions.html#namevaluepairarguments as a guide. Thanks!

回答 (1 件)

Matt J
Matt J 2018 年 7 月 19 日
編集済み: Matt J 2018 年 7 月 19 日
Options=fitoptions(Options, 'Method','NearestInterpolant');

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by