Applies a one-dimensional filter of the input over the specific dimension.
y = filter(b, a, x)
[y, final] = filter(b, a, x, initial)
[y, final] = filter(b, a, x, dim)
[y, final] = filter(b, a, x, initial, dim)
Forward filter coefficients. b is a vector.
Backward filter coefficients. If the first backward filter coefficient does not equal 1, MathScript normalizes the elements in a by the first backward filter coefficient. a is a vector.
Signal to filter. x is a real or complex vector or array of any dimension.
Dimension along which to apply the filter. dim can be in a range of 1 to the maximum supported array dimension (32). If you do not specify dim, the function works with the first dimension whose size is not equal to 1.
Initial conditions of the system. Use [ ] to set the initial conditions to zeros.
Filtered signal. y is a real or complex vector or array of any dimension.
Final conditions of the system.