Two-terms Exponential model
Show older comments
I need to use the polyfit command to determine the best exponential coefficients for the following two-terms equation:
y= a1 * exp(b1*x1^2+b2*x2^2+b3*x1*x2+b4*x1+b5*x2)
For the simplest situation (y= a* exp(kx)) I would proceed like this:
yeqn = @(coefs, x) coefs(1).*exp(coefs(2).*x);
xi = x;
eta = log(y);
P = polyfit(xi, eta, 1);
MyCoefs(1) = exp(P(2));
MyCoefs(2) = P(1)
is there any chance to do the same thing for my situation or should I use another approach?
1 Comment
Rena Berman
on 24 Jan 2017
(Answers dev) Restored question.
Accepted Answer
More Answers (0)
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!