This package contains functions to operate on polynomials, in particular to determine the derivative and the integral of a polynomial and to use a polynomial to fit a given set of data points.
Copyright © 2004-2018, Modelica Association and contributors
Extends from Modelica.Icons.Package
(Icon for standard packages).
Name | Description |
---|---|
derivative | Derivative of polynomial |
derivativeValue | Value of derivative of polynomial at abscissa value u |
derivativeValue_der | Time derivative of derivative of polynomial |
evaluate | Evaluate polynomial at a given abscissa value |
evaluate_der | Evaluate derivative of polynomial at a given abscissa value |
evaluateWithRange | Evaluate polynomial at a given abscissa value with linear extrapolation outside of the defined range |
evaluateWithRange_der | Evaluate derivative of polynomial at a given abscissa value with extrapolation outside of the defined range |
fitting | Computes the coefficients of a polynomial that fits a set of data points in a least-squares sense |
integral | Indefinite integral of polynomial p(u) |
integralValue | Integral of polynomial p(u) from u_low to u_high |
integralValue_der | Time derivative of integral of polynomial p(u) from u_low to u_high, assuming only u_high as time-dependent (Leibniz rule) |
secondDerivativeValue | Value of 2nd derivative of polynomial at abscissa value u |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | u | Abscissa value |
Type | Name | Description |
---|---|---|
Real | y | Value of polynomial at u |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | uMin | Polynomial valid in the range uMin .. uMax |
Real | uMax | Polynomial valid in the range uMin .. uMax |
Real | u | Abscissa value |
Type | Name | Description |
---|---|---|
Real | y | Value of polynomial at u. Outside of uMin,uMax, linear extrapolation is used |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p1[:] | Polynomial coefficients (p1[1] is coefficient of highest power) |
Type | Name | Description |
---|---|---|
Real | p2[size(p1, 1) - 1] | Derivative of polynomial p1 |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | u | Abscissa value |
Type | Name | Description |
---|---|---|
Real | y | Value of derivative of polynomial at u |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | u | Abscissa value |
Type | Name | Description |
---|---|---|
Real | y | Value of 2nd derivative of polynomial at u |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p1[:] | Polynomial coefficients (p1[1] is coefficient of highest power) |
Type | Name | Description |
---|---|---|
Real | p2[size(p1, 1) + 1] | Polynomial coefficients of indefinite integral of polynomial p1 (polynomial p2 + C is the indefinite integral of p1, where C is an arbitrary constant) |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients |
Real | u_high | High integrand value |
Real | u_low | Low integrand value, default 0 |
Type | Name | Description |
---|---|---|
Real | integral | Integral of polynomial p from u_low to u_high |
Polynomials.fitting(u,y,n) computes the coefficients of a polynomial p(u) of degree "n" that fits the data "p(u[i]) - y[i]" in a least squares sense. The polynomial is returned as a vector p[n+1] that has the following definition:
p(u) = p[1]*u^n + p[2]*u^(n-1) + ... + p[n]*u + p[n+1];
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | u[:] | Abscissa data values |
Real | y[size(u, 1)] | Ordinate data values |
Integer | n | Order of desired polynomial that fits the data points (u,y) |
Type | Name | Description |
---|---|---|
Real | p[n + 1] | Polynomial coefficients of polynomial that fits the date points |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | u | Abscissa value |
Real | du | Delta of abscissa value |
Type | Name | Description |
---|---|---|
Real | dy | Value of derivative of polynomial at u |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | uMin | Polynomial valid in the range uMin .. uMax |
Real | uMax | Polynomial valid in the range uMin .. uMax |
Real | u | Abscissa value |
Real | du | Delta of abscissa value |
Type | Name | Description |
---|---|---|
Real | dy | Value of derivative of polynomial at u |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients |
Real | u_high | High integrand value |
Real | u_low | Low integrand value, default 0 |
Real | du_high | High integrand value |
Real | du_low | Low integrand value, default 0 |
Type | Name | Description |
---|---|---|
Real | dintegral | Integral of polynomial p from u_low to u_high |
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function
(Icon for functions).
Type | Name | Description |
---|---|---|
Real | p[:] | Polynomial coefficients (p[1] is coefficient of highest power) |
Real | u | Abscissa value |
Real | du | Delta of abscissa value |
Type | Name | Description |
---|---|---|
Real | dy | Time-derivative of derivative of polynomial w.r.t. input variable at u |
Generated 2018-12-12 12:14:17 EST by MapleSim.