DADiSP Worksheet Functions > Function Categories > Curve Fitting > EXPFIT
Fits y(x) = A ebx using linearization.
EXPFIT(series)
(fit, coef) = EXPFIT(series)
(fit, A, b) = EXPFIT(series)
series |
- |
Input series or array. |
A series.
(fit, coef) = EXPFIT(series) returns both the fit and the coefficients as a series.
(fit, A, b) = EXPFIT(series) returns both the fit as a series and the coefficients as separate coefficients.
W1: 10 * exp((1..100) * -0.5)
W2: expfit(w1);overplot(w1, lred)
overplots the original data with the calculated exponential fit.
(fit, coef) = expfit(w1)
fit is the same series as in W2
coef == {10.0, -0.5}
EXPFIT fits an exponential curve of the form:
The fit is accomplished by fitting a line to the following equation:
If y is not positive, the result will be complex.
The fitted exponential curve (fit, coef) = expfit(series) returns both the fit and the coefficients as a series where coef is in the form {A, b}.
The fitted exponential curve (fit, A, b) = expfit(series) returns the fit as a series and the coefficients as separate scalars.