フィルターのクリア

Please help on curve fitting

1 回表示 (過去 30 日間)
Anwar
Anwar 2018 年 11 月 29 日
回答済み: John D'Errico 2018 年 11 月 29 日
I need to fit my data sets to an equation Y = A + Bx^2 + C D^4. With my limited knowledge, I have tried p=polyfit(x,y,4); which returned with values for coefficients of x and x^3 terms. Would really apprecite any help.
Thank you

採用された回答

John D'Errico
John D'Errico 2018 年 11 月 29 日
Assuming that you mean a model of the form
Y = A + Bx^2 + C x^4
Simple is to download my polyfitn from the file exchange, which can allow you to specify a specific model.
As easy for this very specific case is to use polyfit, on the transformed quadratic model:
Y = A + Bu + C u^2
where you define u as x^2. Get that from:
p=polyfit(x.^2,y,2);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by