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