next up previous contents
Next: 4 plot_ ale Up: 9 Non-adaptive, Visualization and Previous: 2 mcmixr   Contents


3 osfilter

Purpose
Fast FIR filter implementation in frequency domain using the overlap-save method.

Syntax
y = osfilter(h,x)
y = osfilter(h,x,L)

Description
osfilter(h,x) filters the signal x through the filter h in frequency domain using the overlap-save method. If given, the optional third input argument L is used as the number of new input samples per block. If L is not given, it is calculated internally for maximum speed. x can be either a vector or a matrix. If x is a vector, then h must also be a vector. If x is a matrix, then h can either be a vector in which case each column of x will be filtered through the same filter h, or a matrix of the same number of columns as x, in which case each column of x will be filtered by the corresponding coefficients vector in h. If the filter length is smaller than the number of columns, pad h with zeros so that the number of rows is always larger than the number of columns. The input and output parameters of osfilter() are summarized below.
Input Parameters [Size] :: 
   h : single or multichannel FIR coefficients
   x : single or multichannel input signal. 
   L : [optional] number of new input samples per block

Output parameters [Size] ::
   y  : filter output
Example
% Filter two signals in one go through the 
% same filter
x = rand(1000,2);
h = [.5 .3 0 .1];
y = osfilter(h,x);
See also
MCMIXER

next up previous contents
Next: 4 plot_ ale Up: 9 Non-adaptive, Visualization and Previous: 2 mcmixr   Contents