Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:language_reference:objects:interpolatingfunction:start [2018/09/26 12:12] – Martin Brass | documentation:language_reference:objects:interpolatingfunction:start [2024/09/16 11:45] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{indexmenu_n> | {{indexmenu_n> | ||
- | ====== | + | ====== |
### | ### | ||
- | 1D interpolation is currently implemented using cubic splines. Further methods will follow. An interpolating function can be evaluated at a given point or on a set of points, which gives a speed boost, if these points are in ascending order. Higher order derivatives of the interpolating function can also be evaluated. | + | 1D interpolation is currently implemented using cubic splines. Further methods will follow. An interpolating function can be evaluated at a given point or on a set of points, which gives a speed boost, if these points are in ascending order. Higher order derivatives of the interpolating function can also be evaluated. Multiple arithmetic operations on interpolating functions are implemented. Addition and subtraction of splines of a given order leads to a new spline of the same order. For multiplication, |
### | ### | ||
Line 23: | Line 23: | ||
f({1.2, | f({1.2, | ||
+ | |||
+ | y2 = {2,1,2} | ||
+ | g = InterpolatingFunction.Spline(x, | ||
+ | y3 = {2, | ||
+ | |||
+ | -- Arithmetics: | ||
+ | f + g | ||
+ | f - g | ||
+ | |||
+ | FtimesG = InterpolatingFunction.Spline(x, | ||
+ | print(FtimesG == f * g) -- these functions are equal | ||
+ | |||
+ | f^3 == f*f*f | ||
+ | |||
+ | f..g -- concatenation; | ||
+ | |||
+ | InterpolatingFunction.Integrate(f) -- integrates f over its full domain | ||
+ | a = 1.5 | ||
+ | b = 2.5 | ||
+ | InterpolatingFunction.Integrate(f, | ||
+ | |||
</ | </ | ||
- | ==== Result ==== | ||
- | <file Quanty_Output> | ||
- | Try it yourself ;) | ||
- | </ | ||
===== Table of contents ===== | ===== Table of contents ===== | ||
{{indexmenu> | {{indexmenu> | ||