フィルターのクリア

determine a relationship from Curve fitting

1 回表示 (過去 30 日間)
S.Sil
S.Sil 2015 年 11 月 12 日
コメント済み: Star Strider 2015 年 11 月 12 日
Well i am learning about curve fitting but got confused about one question and could not find proper help elsewhere. How do i find the relationship of a particular form in the curve fitting. I have the date given below: T= 200 600 1000 1400 K= 1.0 0.4 0.3 0.25
so i plot the given data using: %%Given data T=[200 600 1000 1400];% temperature K=[1 0.4 0.3 0.25];%thermal conductivity plot(T,K,'*')%ploting the data
now how do i determine a relationship of a specific form Tk^a=b with the given data.suppose a and b are constants.

採用された回答

Star Strider
Star Strider 2015 年 11 月 12 日
A little algebra gives K=(b/T)^(1/a).
Using nlinfit:
T=[200 600 1000 1400];
K=[1 0.4 0.3 0.25];
Kfit = @(B,T) (B(2)./T).^(1./B(1)); % Model
B = nlinfit(T, K, Kfit, rand(2,1));
Tv = linspace(min(T), max(T));
figure(1)
plot(T,K,'*')
hold on
plot(Tv, Kfit(B,Tv), '-r')
hold off
grid
giving a=1.3 and b=199.
  2 件のコメント
S.Sil
S.Sil 2015 年 11 月 12 日
thanks.. how do i get the answers a and b as its not showing in my case.
Star Strider
Star Strider 2015 年 11 月 12 日
My pleasure.
The easiest way is to just remove the semicolon (;) from the end of the nlinfit call:
B = nlinfit(T, K, Kfit, rand(2,1))
with a=B(1) and b=B(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