General LS Linear Fit PtByPt VI

Owning Palette: Fitting PtByPt VIs

Requires: Full Development System

Finds the Best Fit k-dimensional plane and the set of linear coefficients for the set of input data points specified by sample length.

This VI is similar to the General Linear Fit VI.

Note  By default, reentrant execution is enabled in all Point By Point VIs.

Details  

 Add to the block diagram  Find on the palette
initialize, when TRUE, initializes the internal state of the VI.
H is the matrix that represents the formula you use to fit the data set {X,Y}. H[i][j] are the function values of X[i].
y is an input data point.
Standard Deviation is the standard deviation for data point (xi, yi). The default is 1.0. If xi and yi are equal or you do not know their values, leave Standard Deviation empty.
covariance selector indicates whether the VI computes the covariance matrix.

0do not compute Covariance
1compute Covariance
algorithm specifies the algorithm this VI uses to compute Best Fit.

0SVD (default)
1Givens
2Givens2
3Householder
4LU Decomposition
5Cholesky
sample length is the length of each set of incoming data. The VI performs computation for each set of data. The default is 100. sample length must be greater than 0 and equal to the number of rows in H.
Coefficients is the set of coefficients that minimize chi squared. The following equation defines 2, where is equal to the i-th element in Weight:

Best Fit is the fitted data computed by using Coefficients.
Covariance is the matrix of covariance C with k-by-k elements. cjk is the covariance between ai and ak. cjj is the variance of aj. This VI uses the following equation to compute the covariance matrix C:

C = (H0TH0)–1

mse is the mean square 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.

General LS Linear Fit PtByPt Details

The General LS Linear Fit PtByPt VI uses the least-chi-square method for observation data sets where i = 0, 1, …, n – 1, where n is the number of your observation data sets.

The General LS Linear Fit PtByPt VI finds the k-dimensional linear curve values and the set of k-dimensional linear fit coefficients, which describe the k-dimensional linear curve that best represents the input data set using the least-squares solution. The general form of the k-dimensional linear fit is

z[i] = b[0] + Sum{b[j] H(X[i], j)} for j = 1, 2, …, k – 1; i = 0, 1, …, n – 1,

where H is the input matrix which represents the formula you use to fit the data set{X, Y},

H[i][j] are the function values of X[i],

b is the set of Coefficients,

k is the number of elements in Coefficients,

n is the number of elements in data set{X,Y},

z is the output Best Fit.