Example is wrong => zero-phase filter - filtfilt(ver. 2009a)
Ältere Kommentare anzeigen
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 Kommentar
Kaustubha Govind
am 9 Mai 2011
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).
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 9 Mai 2011
0 Stimmen
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 Kommentar
Nak
am 9 Mai 2011
Kategorien
Mehr zu Digital Filtering finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!