.Modelica_LinearSystems2.Math.Polynomial.fitting

Information

Syntax

p = Polynomial.fitting(x, y, order);

Description

This function computes a Polynomial y = p(x) of degree "order" that fits the data p(xi) - yi for i = 1, .. nx in a least squares sense.

Interface

encapsulated function fitting
  import Modelica;
  import Modelica_LinearSystems2.Math.Polynomial;
  input Real x[:] "Abscissa data values";
  input Real y[size(x, 1)] "Ordinate data values";
  input Integer order(min = 1) "Order of desired polynomial that fits the data points (x,y)";
  output Polynomial p(redeclare Real c[order + 1]) "Polynomial that fits the date points in a least squares sense";
end fitting;

Generated at 2024-12-17T19:26:02Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos