splineFit

Block Category: Matrix Operation

Inputs:

      X and Y: Accept columns of X- and Y-coordinates.

      Signal In: Input signal.

Description: The splineFit block calculates a spline fit to two vectors of X,Y data, and returns the resulting curves with the second block input as the independent variable. Output is the modified input signal.

Calculate coefficients once on startup: Calculates the polynomial fit once at start of the simulation, which is fine for static data sets. The fit algorithm is numerically costly, so it should only be run if needed.

Spline Type

Cubic: Calculates the piece-wise polynomial of degree 3.

Linear: Calculates the piece-wise polynomial of degree 1.

Parabolic: Calculates the piece-wise polynomial of degree 2.