MATLAB: How to create a test bench waveform for the working of band pass and low pass filter

digital signal processingMATLAB

Hi,
I created a band pass filter and low pass filter through sptool in matlab and imported the co-efficients into workspace
Now I need to write a testbench for the working of these filters.
Can anyone suggest something about this
Thanks in advance

Best Answer

Hi Vivek,
What is the purpose of the test bench? If you purpose is to look at the filter response, then in my opinion it is better to examine the filter response. Say you have the filter coefficients b and a, then you can do
>> fvtool(b,a)
to look at the response.
If you really want to pass the data, you can use randn to generate some white noise data and then run it through the filter, e.g.,
>> x = randn(1024,1);
>> y = filter(b,a,x);
HTH