how to get coefficients by fitting power law for 4 variables ?

2 ビュー (過去 30 日間)
naveen kumar s
naveen kumar s 2021 年 8 月 16 日
編集済み: Matt J 2021 年 8 月 17 日
Say I have three datasets namely U, X, Y, and Z. As per literature, I have to find the relationship between the U and other three variables as given by the equation: (i.e. i have to find a, b,c, and d because i have large set of values of U, X, Y, Z : say 100 case values).
fo
please guide me how to get coefficeints using matlab code.
Thanks

採用された回答

Matt J
Matt J 2021 年 8 月 16 日
編集済み: Matt J 2021 年 8 月 16 日
A=log([X(:),Y(:),Z(:)]);
A(:,end)=1;
abcd=A\log(U(:)); %the coefficients
abcd(1)=exp(abcd(1));
  2 件のコメント
naveen kumar s
naveen kumar s 2021 年 8 月 17 日
編集済み: naveen kumar s 2021 年 8 月 17 日
thanks. I will try this code.
& in last line
>> abcd(1) = exp(abcd(1)
does this line only give first coefficient right.
for other coefficients do we need to take exp(2:4).
Matt J
Matt J 2021 年 8 月 17 日
編集済み: Matt J 2021 年 8 月 17 日
No, the model is log-linear in b,c, and d.

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

その他の回答 (0 件)

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by