Curve Fitting Toolbox with multiple variables

12 ビュー (過去 30 日間)
Ahmet Hakan UYANIK
Ahmet Hakan UYANIK 2022 年 6 月 7 日
回答済み: Torsten 2022 年 6 月 7 日
Hello,
I have generated the code with cftool of matlab however it seems like more than 2 independent variable is not possible with this toolbox.
There are some solutions provided like lsqcurvefit or lsqnonlin but they are not limiting range of coefficients as generated code from cftool below.
Do you know how can i apply with 3 independent variables with limiting the range of coefficients as below?
Thank you in advance for your comments and ideas
[xData, yData, zData, sData] = prepareSurfaceData( Wm, Ym, Qm, Sm);
% Set up fittype and options.
ft = fittype( ['a*x^b*s^c*y^d'], 'independent', {'x', 'y','s'}, 'dependent', 'z' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Display = 'Off';
opts.Lower = [-Inf 0.9 0.3 1.3];
opts.Upper = [Inf 1.1 0.7 1.8];
opts.StartPoint = [0.706046088019609 0.0318328463774207 0.27692298496089 0.0461713906311539];

採用された回答

Torsten
Torsten 2022 年 6 月 7 日
lsqnonlin and lsqcurvefit allow to prescribe lower and upper bounds (lb,ub) on the parameters:

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by