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:UIntSize; degX, degY:UInt );
CUDA function C/C++#include <cudaMFstd.h>
int cudaMF_polyinterpol( fMatrix d_MZ, fVector d_X, fVector d_Y, ui ht, ui len, fVector d_XTab, fVector d_YTab, fMatrix d_MZTab, ui httab, ui lentab, unsigned degX, unsigned degY );
void MFcu_polyinterpol( fMatrix h_MZ, fVector h_X, fVector h_Y, ui ht, ui len, fVector h_XTab, fVector h_YTab, fMatrix h_MZTab, ui httab, ui lentab, unsigned degX, unsigned degY );
CUDA function Pascal/Delphiuses MFstd;
function cudaMF_polyinterpol( d_MZ:fMatrix; d_X, d_Y:fVector; ht, len:UIntSize; d_XTab, d_YTab:fVector; d_MZTab:fMatrix; httab, lentab:UIntSize; degX, degY:UInt ): IntBool;
procedure MFcu_polyinterpol( h_MZ:fMatrix; h_X, h_Y:fVector; ht, len:UIntSize; h_XTab, h_YTab:fVector; h_MZTab:fMatrix; httab, lentab:UIntSize; degX, degY:UInt );
DescriptionFor each of the htlen 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