Filter signal with channel object
y = filter(chan,x)
y = filter(chan,x) processes the baseband signal vector x with the channel object chan. The result is the signal vector y. The final state of the channel is stored in chan. You can construct chan using either rayleighchan or ricianchan. The filter function assumes x is sampled at frequency 1/ts, where ts equals the InputSamplePeriod property of chan.
If chan.ResetBeforeFiltering is 0, filter uses the existing state information in chan when starting the filtering operation. As a result, filter(chan,[x1 x2]) is equivalent to [filter(chan,x1) filter(chan,x2)]. To reset chan manually, apply the reset function to chan.
If chan.ResetBeforeFiltering is 1, filter resets chan before starting the filtering operation, overwriting any previous state information in chan.
Examples using this function are in Use Fading Channels.
 Jeruchim, Michel C., Philip Balaban, and K. Sam Shanmugan, Simulation of Communication Systems, Second Edition, New York, Kluwer Academic/Plenum, 2000.