butter filter
Mostra commenti meno recenti
hi
suppose there are three signal like this
syms t x
a=2*sin(2*pi*t*300)
b=2*sin(2*pi*t*600)
c=2*sin(2*pi*t*900)
i I'll pass the frequency of 900 with butter filter
and my script is
syms t x
a=2*sin(2*pi*t*300)
b=2*sin(2*pi*t*600)
c=2*sin(2*pi*t*900)
z=a+b+c
[z,a]=butter(3,90/100)
fvtool(z,a)
where is the problem ?
please help
4 Commenti
Walter Roberson
il 25 Giu 2012
What problem? Is the code producing an error message, or is the result not matching your expectation?
Is there a reason that you carefully compute z=a+b+c and then throw away the value for z by assigning to z in the statement [z,a]=butter(3,90/100) ?
amir
il 26 Giu 2012
Walter Roberson
il 26 Giu 2012
Since you are overwriting "z" in your assignment of the output of butter(), you might as well not calculate the initial "z". The initial "z" is formed from the variables "a", "b", and "c", and those variables are not used after that point (the "a" that appears later is the "a" that is output from butter()), so you might as well not calculate them either. This reduces your script to
[z,a]=butter(3,90/100)
fvtool(z,a)
Are you sure that is correct and sufficient ??
If you want to pass 900 Hz and reject other frequencies, then you need a very narrow band-pass filter. The syntax you have used for butter() is not correct for creating a band-pass filter.
amir
il 26 Giu 2012
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Downloads in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!