Right filter syntax for the [z,p,k] syntax
Mostrar comentarios más antiguos
Hi, I used the butterworth filter with the [b,a] syntax:
filtord=4;
SampleRate=20000;
d = fdesign.bandpass('N,F3dB1,F3dB2',4,100, 300,SampleRate);
hd = design(d,'butter');
% zero phase shift by reverse filtering
SignalFiltered=filtfilt(b,a, Signal);
Now I want to use higher order filter numbers where the help suggests to switch to the [z,p,k] syntax.
Wn=[100,300]/(SampleRate/2); % cutoff frequencies normalized by nyquist
ftype='bandpass';
filtord=10;
[z, p, k] = butter(filtord,Wn,ftype);
[sos,g]=zp2sos(z,p,k);
hd=dfilt.df2sos(sos,g);
Simple question: would will be the appropriate filter command (SignalFiltered=filtfilt(??))? Or is there a missing piece of code? Thanks for your advice!
P.S.: Is the missing code the following:
[b,a]= sos2tf(hd.sosMatrix,hd.ScaleValues);
SignalFiltered=filtfilt(b,a, Signal);
?????
Respuesta aceptada
Más respuestas (1)
Peter
el 27 de Jun. de 2013
0 votos
1 comentario
Honglei Chen
el 27 de Jun. de 2013
I updated the answer above
Categorías
Más información sobre Digital Filter Analysis en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!