Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 25 de Jun. de 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
el 26 de Jun. de 2012
Walter Roberson
el 26 de Jun. de 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
el 26 de Jun. de 2012
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Downloads 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!