interp
Interpolation of a randomly sampled signal.
Namespace: dsp::filter
Prototype
Vector<T> interp(const Vecf &x, const Vector<T> &y, const Vecf &x2, InterpOption mode=LINEAR)
Parameters
x | Vector with input sampling positions (must be a growing sequence). |
y | Vector of known values at the specified sampling positions. |
x2 | Vector with desired sampling points (must be a growing sequence). |
mode | Type of desired interpolation (lineair or natural splines). |
Description
This function will resample a signal, for which we know the values only at some time points, not necessarily equidistant. Given a set of \(N\) points \((x_k,f(y_k))\), it computes a set of values \(f(x'_k)\), the \(x'_k\) being equidistant between \(x_0\) and \(x_{N-1}\).