Polynomial Fitting


polyfit.m overloads the polyfit() function of MATLAB for Analysis Objects.
The script calls the following MATLAB functions:

Usage

      % CALL:        b = polyfit(a, pl)
      %
      % Parameters:  'N'      - degree of polynomial to fit
      %              'coeffs' - (optional) coefficients
      %                         formed e.g. by [p,s] = polyfit(x,y,N);
  
The MATLAB function polyfit.m finds the coefficients of the polynomial p(x) of degree N that fits the vector 'x' to the vector 'y', in a least squares sense.
After this in the script polyfit.m the function polyval.m is called, which evaluates the polynomial of order 'N' according to these coefficients.
Using the output of polyval.m the fitted data series is created and outputted as analysis object.



©LTP Team