How i use the command Butter?
Mostrar comentarios más antiguos
I have two questions. The first question is: How do I choose the cutoff frequency of the Butterworth filter The second question is how to filter this data? Attached the link to download the data? https://docs.google.com/open?id=0BzSixbWRFmQLbmRRSC0tUEdMMlU
Thank you. I use this algorith
for m=1:endoffile
[a,b]=butter(4,6(210/2), 'low')
exit(1:4,m)=filter(d,f,arq(1:4,m))
However, the results are very different from the actual data.
3 comentarios
Jan
el 14 de Nov. de 2012
What is "6(210/2)"?
Daniel Shub
el 14 de Nov. de 2012
In general masking built-in functions with variables is a bad idea. Masking EXIT is only asking for problems.
Marcelo Costa
el 20 de Nov. de 2012
Respuesta aceptada
Más respuestas (2)
Wayne King
el 13 de Nov. de 2012
Editada: Wayne King
el 13 de Nov. de 2012
Nobody can answer how to choose the cutoff frequency for you. That depends on your filter design. Suppose I wanted to filter data below 150 Hz and the data were sampled at 1 kHz. I would do the following. First I'll create some data and then filter it.
t = 0:0.001:1-0.001;
x = cos(2*pi*100*t)+randn(size(t));
[B,A] = butter(10,150/(1000/2));
y = filter(B,A,x);
If you want to view the magnitude response of your Butterworth filter, enter:
fvtool(B,A,'Fs',1000)
Obviously you have to use the correct sampling frequency.
Marcelo Costa
el 20 de Nov. de 2012
Categorías
Más información sobre Analog Filters en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!