Constructor | Description |
|
|
Static member | Description |
Full Usage:
Approximation.approxWithPolynomial (f, i, n, spacing)
Parameters:
float -> float
-
Function that should be approximated by a polynomial interpolating function.
i : Interval<float>
-
Interval for which the function should be approximated
n : int
-
number of points that should be placed within the interval (incl. start and end)
spacing : Spacing
-
X values can be spaced equally or according to chebyshev.
Returns: PolynomialCoef
Coefficients for polynomial interpolation. Use Polynomial.fit to predict function values.
|
Determines polynomial coefficients to approximate the given function with (i) n equally spaced nodes or (ii) n nodes spaced according to Chebyshev. Use Polynomial.fit to get a polynomial function of the coefficients.
|
Full Usage:
Approximation.approxWithPolynomialFromValues (xData, yData, n, spacing)
Parameters:
seq<float>
-
Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)
yData : seq<float>
-
vector of y values
n : int
-
number of points that should be placed within the interval (incl. start and end)
spacing : Spacing
-
X values can be spaced equally or according to chebyshev.
Returns: PolynomialCoef
Coefficients for polynomial interpolation. Use Polynomial.fit to predict function values.
|
Determines polynomial coefficients to approximate the given data with (i) n equally spaced nodes or (ii) n nodes spaced according to Chebyshev. Use Polynomial.fit to get a polynomial function of the coefficients.
|