class="resources"
Finds the exponential curve values and the set of exponential coefficients amplitude and damping, which describe the exponential curve that best represents the input data set using the least-squares solution. Details Examples

![]() |
Standard Deviation is the standard deviation, sigma[i] for data point (x[i],y[i]). If they are equal or you do not know, leave this array empty. Internally, LabVIEW sets all to 1.0. |
![]() |
Y must have the same sign and must contain at least two points.
That is, yi > 0 for i = 0, 1,
n 1 or yi < 0 for i = 0, 1,
n 1, n 2, where Y represents the input sequence Y and n is the number of data points. If the signs are inconsistent or there are less than two sample points, the VI sets Best Exponential Fit to an empty array, sets amplitude, damping, and mse to NaN, and returns an error via the Exponential Fit Coefficients VI.
|
![]() |
X must contain at least two points. n is greater than or equal to 2, where n is the number of data points. |
![]() |
Best Exponential Fit is the calculated values of the best exponential fit. |
![]() |
amplitude is the amplitude of Best Exponential Fit. |
![]() |
damping is the damping constant of Best Exponential Fit. |
![]() |
mse is the mean squared error. |
![]() |
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
The following equation gives the general form of the exponential fit.

where F is the output sequence Best Exponential Fit, X is the input sequence X, a is the amplitude, and
is the damping constant.
The exponential fit assumes a model of the data of the following form.

where x is the independent variable, y is the dependent variable, a is amplitude, and
is damping.
The fitting problem is to identify
and a when given x and y.
The following actions and conditions summarize how to solve for
and a.
. ln(y) = ln(a) +
x.
and
, then
.
is the equation of a line where x is the independent variable and
is the dependent variable.
and
.
. Recall that
, or
.The VI calculates mse using the following equation.

where f is the output sequence Best Exponential Fit, y is the input sequence Y, and n is the number of data points.
![]() | Note This VI performs an exponential fit even when the elements of Y are negative. It performs the fit under the assumption that the amplitude coefficient is also negative and returns a negative amplitude. Y cannot contain both positive and negative elements. |
Refer to the following VIs for examples of using the Exponential Fit VI: