フィルターのクリア

Regression curve fitting for a given equation

2 ビュー (過去 30 日間)
Arvind
Arvind 2023 年 6 月 12 日
コメント済み: the cyclist 2023 年 6 月 12 日
Find the best fit by given equation
x = [0.0191051892041436 0.0199064802088661 0.0205144445903776 0.0210029746368803 0.0216434799932356 0.0226870689634767 0.0238694334820173 0.0247271126862428 0.0255324218699147 0.0266869614901355];
y = [0.726909090909091 0.731030303030303 0.730909090909091 0.709818181818182 0.664424242424242 0.621454545454545 0.606848484848485 0.597151515151515 0.595939393939394 0.583333333333333];
plot(x, y, 'b.-');
grid on;
where y = (x/a)*ln((m-1)/b) +y0

採用された回答

Matt J
Matt J 2023 年 6 月 12 日
編集済み: Matt J 2023 年 6 月 12 日
p=polyfit(x,y,1);
From this, you immediately obtain y0=p(2). For the remaining parameters, you can choose any of the infinite solutions to ln((m-1)/b)/a=p(1).
  2 件のコメント
Arvind
Arvind 2023 年 6 月 12 日
i have want all values like m, b and a separetly
the cyclist
the cyclist 2023 年 6 月 12 日
@Arvind, the equation you want to fit to,
y = (x/a)*ln((m-1)/b) + y0
is equivalent to
y = x*c + y0
where
c = (1/a)*ln((m-1)/b)
The solution that @Matt J provided is solving for y0 and what I called c.
It is not possible (without other restrictions) to determine what a, m, and b are. As Matt stated, there are literally an infinite combination of possibilities.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by