VirtualArray.PolynomialFit(Array, Variable, Variable) Method

Top 

Description

Uses Singular Value Decomposition to compute the coefficients of a polynomial to best fit the provided data set. The coefficients are returned in order of highest to lowest degree.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

 

Method Signature

VirtualArray.PolynomialFit(

Array yValues,


Variable polynomialDegree,


Variable rSquared)

 

Arguments

yValues


Description:

The y values of the data set to be fit.

 

polynomialDegree


Description:

The degree of the polynomial to fit to the data.

Valid Range:

polynomialDegree > 0

 

rSquared


Description:

The coefficient of determination, which measures the quality of the polynomial fit to the data. The value has a range from 0 to 1, with 1 indicating a perfect fit.

Valid Range:

rSquared ≥ 0

 

 

Return Value

Type:

Matrix of number

 

Returns a row matrix of the polynomial coefficients in order of highest to lowest degree. The number of columns of the matrix will be polynomialDegree + 1.

 

Syntax

myMatrix1 = {1,2,3,4}.PolynomialFit(myArray1, myVariable1, myVariable2);

 

See also

VirtualArray Object

VirtualArray.PolynomialFit