How do i use the function 'firceqrip' on my data?

조회 수: 2 (최근 30일)
Sandeep Kapour
Sandeep Kapour 2020년 5월 22일
답변: Ricardo Losada 2020년 6월 15일
Hi guys,
I have a dataset and I want to filter these values with the function firceqrip. If I design a firceqrip like eqnum = firceqrip(N,Fp/(Fs/2),[Rp Rst],'passedge');, how is it possible to use this filter design on my dataset? If I use filter(eqnum, dataset), then I get a error.
  댓글 수: 1
Raunak Gupta
Raunak Gupta 2020년 5월 28일
Hi,
Can you specifically mention what kind of dataset it is or if you have written any code and some specific error message you faced so that it can help me better understand the question.

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

답변 (1개)

Ricardo Losada
Ricardo Losada 2020년 6월 15일
Hi,
firceqrip() returns a vector of numerator (FIR) coefficients.
To apply the filter to a dataset, you have two options:
  • Use filter():
filterdata = filter(eqnum,1,dataset); % Specify denominator vector to be 1 since it is an FIR filter
  • If you need to stream data, use dsp.FIRFilter():
myfir = dsp.FIRFilter(eqnum);
filterdata1 = myfir(dataset1);
filterdata2 = myfir(dataset2); % Maintains state from previous call
... % etc

카테고리

Help CenterFile Exchange에서 Get Started with DSP System Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by