Two-terms Exponential model
Ältere Kommentare anzeigen
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 Kommentar
Rena Berman
am 24 Jan. 2017
(Answers dev) Restored question.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Polynomials finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!