I have an equation of form y=a*(x1^b)*(x2^c)*(x3^d)*(x4^e)
where x1, x2, x3, x4 are variables and y is output. I have all these values experimentally.
I need to fit this equation to calculate optimum values of a, b, c, d and e.
Please provide a suitable matlab code.

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 12월 2일
편집: Andrei Bobrov 2014년 12월 2일

0 개 추천

x = [x1(:) x2(:) x3(:) x4(:)];
abcde = [ones(numel(y),1),log(x)]\log(y);
abcde(1) = exp(abcde(1));
your function
yourfun = @(x,a)a(1)*prod(bsxfun(@power,x,reshape(a(2:end),1,[])),2);
Please read about use '\'

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

질문:

2014년 12월 2일

편집:

2014년 12월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by