us.ihmc.utilities.math
Class ZeroLagLowPassFilter
java.lang.Object
us.ihmc.utilities.math.ZeroLagLowPassFilter
public class ZeroLagLowPassFilter
- extends java.lang.Object
Method Summary |
static java.util.ArrayList<java.lang.Double> |
getFilteredArray(java.util.ArrayList<java.lang.Double> arrayToFilter,
double alpha)
This is a zero phase lag filter with the same performance and the Matlab filtfilt function
when the filter type is a first order low pass filter. |
static double[] |
getFilteredArray(double[] arrayToFilter,
double alpha)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZeroLagLowPassFilter
public ZeroLagLowPassFilter()
getFilteredArray
public static java.util.ArrayList<java.lang.Double> getFilteredArray(java.util.ArrayList<java.lang.Double> arrayToFilter,
double alpha)
- This is a zero phase lag filter with the same performance and the Matlab filtfilt function
when the filter type is a first order low pass filter. This will extrapolate beginning and end of data sequence using a "reflection method".
Slopes of original and extrapolated sequences match at the end points. This reduces end effects.
- Parameters:
arrayToFilter
- alpha
- this is [0, 1]. 0 = no filter, 1= all filter.
- Returns:
getFilteredArray
public static double[] getFilteredArray(double[] arrayToFilter,
double alpha)
main
public static void main(java.lang.String[] args)