Basic Options
Purpose
Description
Tips
Macro Synopsis
Modules
Related Functions
References
Purpose
Set the default interpolation type and order (Macro only)
Description
"Basic Options" allows you to change the default type of
interpolation used to adapt two signals to a common sampling
frequency. Interpolation is used implicitly every time two signals
of unequal sampling period (scale) and/or x-axis-offset are
combined, so these changes have global effects on most of the
functions operating on more than one signal. Warning: In order to avoid confusion, make sure that the
x-axis units of the input signals to be combined are equal since
there is no automatic unit conversion.
Parameters for "Basic Options" are
- Type (type) of interpolation:
- "Linear" (0) : Linear interpolation between consecutive samples
- "Lagrange" (1) : Performs a polynomial interpolation of
the (odd) order given in the second parameter (see below).
- "Resample" (2) : Re-samples the signal to a new size using
low-pass filtering in the time domain according to the sampling
theorem. Warning: Due to the filtering algorithm used, shift
errors can occur if the x-axis offsets of the two signals are
not identical.
- "Spline" (3) : Perfoms a cubic spline interpolation.
- (odd) Lagrange interpolation order (order) ranging from
1 to 7. An interpolation of order 1 corresponds to linear
interpolation. For interpolation types other than Lagrange, the
order is ignored.
Tips
In general, smooth functions are best approximated by higher
order polynomials, whereas for functions with sharp corners or rapidly
changing higher derivatives, the choice of lower-order or even
linear approximation gives more accurate results.
Macro Synopsis
BasicOptions(type, order);
option type;
int order;
Note: The order parameter must be set for every
interpolation type (even if not used).
Modules
Basic
Related Functions
Spectral Options, Resample.
References
Press et al. [16], Crochiere [17]