FunctionPolynomial interpolation of X-Y-MZ-table values
Syntax C/C++#include <MFstd.h>
void MF_polyinterpol( fMatrix MZ, fVector X, fVector Y, ui ht, ui len, fVector XTab, fVector YTab, fMatrix MZTab, ui httab, ui lentab, unsigned degX, unsigned degY );
C++ VecObj#include <OptiVec.h>
void matrix<T>::polyinterpol( const vector<T>& X, const vector<T>& Y, const vector<T>& XTab, const vector<T>& YTab, const matrix<T>& MZTab, unsigned degX, unsigned degY );
Pascal/Delphiuses MFstd;
procedure MF_polyinterpol( MZ:fMatrix; X, Y:fVector; ht, len:UIntSize; XTab, YTab:fVector; MZTab:fMatrix; httab, lentab, degX, degY:UInt );
DescriptionFor each of the ht * len x / y coordinates defined by X and Y, the corresponding element of MZ is interpolated from the XTab-YTab-MZTab values. XTab and YTab must be ordered (either ascending or descending). All values of XTab as well as of YTab must be distinct; otherwise a division by zero may occur and lead to a program abort. The parameter degX denotes the number of points (this is not the degree of the interpolating polynomial!) that will be taken into account for the interpolation in X direction. Similarly, degY denotes the number of points taken into account for the interpolation in Y direction. Any value between 0 and 2 will be interpreted as meaning linear interpolation. A maximum of 10-point interpolation is possible. degX may not be larger than lentab-1; degY may not be larger than httab-1.
Error handlingTrying to use too many elements for the interpolation (degX or degY > 10) leads to an error message "Not possible with more than 10 elements" and to a program abort. If degX exceeds lentab-1, or if degY exceeds httab-1, an error message "Invalid parameter(s)" is displayed and the program aborted.
No other errors are detected (you have to take care yourself that the XTab and YTab values are distinct and that the MZTab values are not near the limit of overflowing).
Return valuenone
See alsoMF_ratinterpol,   MF_natCubSplineInterpol,   VF_polyinterpol

MatrixLib Table of Contents  OptiVec home