Fitting a specific linear function to data

1 回表示 (過去 30 日間)
Samuele Bolotta
Samuele Bolotta 2021 年 6 月 12 日
回答済み: Tarunbir Gambhir 2021 年 6 月 15 日
I have some data to which I want to fit the following function:
c1 * X + c2 * Y
I know the values for X and Y, can you give me a hint as to how I should proceed?
  2 件のコメント
John D'Errico
John D'Errico 2021 年 6 月 12 日
Do you have the curve fitting toolbox? Do you have the stats toolbox? I ask that, because while the fit itself is trivial, your immediate next question will be how to you determine the uncertainties for those parameters, and those toolboxes will do it for you.
Samuele Bolotta
Samuele Bolotta 2021 年 6 月 12 日
Thanks for the hint! As ou can see in the screenshot, I think the only problem is I'd need to specify the function as f(X,Y), but for some reason I can only specifcy it as f(X):

サインインしてコメントする。

回答 (1 件)

Tarunbir Gambhir
Tarunbir Gambhir 2021 年 6 月 15 日
You can launch the Curve Fitting Tool with 'cftool( x, y, z )' for your case. This will create a surface fit to x and y inputs and z output.

カテゴリ

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