필터 지우기
필터 지우기

Example is wrong => zero-phase filter - filtfilt(ver. 2009a)

조회 수: 1 (최근 30일)
Nak
Nak 2011년 5월 9일
There is a example y=filtfilt(SOS,G,x) below
but it doesn't match like example
what is the problem?
I want to know in full - fixed full code
For example, about design with butter code or filtfilt code =======================================================
x = ecg(500)'+0.25*randn(500,1); %noisy waveform
h = fdesign.lowpass('N,F3dB',12,0.15);
dl=design(h,'butter');
y=filtfilt(dl.sosMatrix,dl.ScaleValues,x);
plot(x,'b-.'); hold on;
plot(y,'r','linewidth',3);
legend('Noisy ECG','Zero-phase Filtering','location','NorthEast');
========================================================================
please let me know......
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2011년 5월 9일
Are you saying that running the above code gives you different results from the snapshot in the documentation? If yes, could you post a snapshot of the plot generated on your run?
Note that since you are adding random noise, there may be a small amount of difference in the filtered signal (changes for every run).

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

채택된 답변

Rob Graessle
Rob Graessle 2011년 5월 9일
It looks like the documentation for FILTFILT was changed since R2009a. The page you're looking at is the latest documentation (for R2011a). When I run this example in R2009a, it doesn't look right (as you said). But when I run it in R2011a, it looks fine.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 5월 9일
What difference do you see between the calling sequence and the example? dl.sosMatrix would be a SOS (Second Order Section) such as is required for filtfilt()
  댓글 수: 1
Nak
Nak 2011년 5월 9일
If you run these codes.. Result disagree from linked site's example result...
so.. need to find wrong coding with detail

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

카테고리

Help CenterFile Exchange에서 Digital Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by