필터 지우기
필터 지우기

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 CenterFile Exchange에서 Get 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