beautypg.com

Polynomialfit, Controller functions – MTS Multipurpose Elite User Manual

Page 219

background image

Syntax

Polynomial(X,Coefficients)

Unit Class

The units associated with the Y data used to calculated the coefficients.

Example

Polynomial(X, coefficients)

This example returns the Y value calculated at the value X.

PolynomialFit

The PolynomialFit function fits a polynomial curve of the specified order to the data arrays.

Returns

The coefficients as an array. The number of array values returned is one plus the order specified.

Syntax

PolynomialFit(yArray, xArray, Order[, StartIndex, EndIndex, rSquared])

Parameters

yArray - The Y array data being analyzed.

xArray - The X array data being analyzed.

Order - The order of the polynomial fit.

StartIndex - The optional start index of the region to be analyzed.

EndIndex - The optional end index of the region to be analyzed.

rSquared - An optional variable that is used to pass the coefficient of determination (R2)

Unit Class

Dependent on the coefficient.

Example

PolynomialFit(Force, Extension, 1, Slope1, Slope2)

This example returns the coefficients for a straight line through the regions specified by Slope1 and Slope2.

Controller Functions

This section provides reference information for controller functions.

MTS TestSuite | 219

Working with Variables