Syntax
y = SmoothIdealLowPass.interpolate(buffer,offset);
Description
Interpolate in buffer by using the sinc function.
This is an approximation of an ideal low pass filter that completely blocks
frequencies above the cut-off frequency f = 1/T (where T is
the sample period with which the buffer was filled). Input argument
offset is a Real number marking the point at which interpolation shall
take place.
offset=0 is the first buffer value buffer[1].
offset=size(buffer,1)-1 is the last buffer value buffer[size(buffer,1)].
It is required that 0 ≤ offset < size(buffer,1)-1.
The function returns the interpolated value. The interpolation is continuous
with a continuous first derivative. In order to avoid issues at the end
of the buffer (where a minimally too large offset value triggers an assert),
it is best to make the buffer one element larger as needed.
For example, if the buffer is filled with a sample period of 1 ms
and every 100 samples an event occurs, then the buffer should have length 102
for the samples 0 ms, 1 ms, 2 ms, ...., 100 ms, 101 ms.
Date |
Description |
Sep. 4, 2015 |
|
Generated at 2024-11-24T19:25:44Z
by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos