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

조회 수: 4 (최근 30일)
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

채택된 답변

Honglei Chen
Honglei Chen 2011년 9월 27일
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
  댓글 수: 6
Jim
Jim 2011년 9월 28일
Hi,
Thanks for ur reply
So,without using my friends testbench function filterIIR2t(x,Num,Den) we can directly use inbuilt function
filter(b,a,x)
But when I am using this function filter(b,a,x) I am not getting any response
Can u suggest me something about this
Thanks in advance
Wayne King
Wayne King 2011년 9월 28일
Did you design your filter as a filter object, or as coefficients.
filter() also works with filter objects, so if you have a filter object, use
filter(Hd,x) where Hd is your object
if you have coefficients, then b should be Num and a should be Den
filter(Num,Den,x)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Frequency Transformations에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by