Está en la página 1de 4

Gráfica de las 5 muestras

Filtro Pasa Altas

Aquí observaremos como solamente se van a dejar pasar las frecuencias altas y se
atenuarán las frecuencias bajas

T=1/Fs;
L = 1000;
t = (0:L-1)*T;
x = 0.25*sin(2*pi*10*t)+0.75*sin(2*pi*50*t)+0.35*sin(2*pi*150*t)+0.5*sin(2*pi*280*t)+
0.8*sin(2*pi*320*t);
plot(Fs*t,x);
y=fft(x);
stem(abs(y).^2)
fc=180;
fc1=fc/(0.5*Fs);
[b,a] = butter(8,fc1,'high');
z=filter(b,a,x);
ya=fft(z);
figure
stem(abs(ya).^2)
Filtro Pasa Bajas

Aquí observaremos como solamente se van a dejar pasar las frecuencias bajas y se
atenuarán las frecuencias altas

T=1/Fs;
L = 1000;
t = (0:L-1)*T;
x = 0.25*sin(2*pi*10*t)+0.75*sin(2*pi*50*t)+0.35*sin(2*pi*150*t)+0.5*sin(2*pi*280*t)+
0.8*sin(2*pi*320*t);
plot(Fs*t,x);
y=fft(x);
stem(abs(y).^2)
fc=180;
fc1=fc/(0.5*Fs);
[b,a] = butter(8,fc1,'low');
z=filter(b,a,x);
ya=fft(z);
figure
stem(abs(ya).^2)
Filtro Pasa Bandas

Aquí se muestra como solamente se filtran señales que están en un rango de 45 a 300 Hz

T=1/Fs;
L = 1000;
t = (0:L-1)*T;
x = 0.25*sin(2*pi*10*t)+0.75*sin(2*pi*50*t)+0.35*sin(2*pi*150*t)+0.5*sin(2*pi*280*t)+
0.8*sin(2*pi*320*t);
plot(Fs*t,x);
y=fft(x);
stem(abs(y).^2)
fc=45;
fc1=fc/(0.5*Fs);
[b,a] = butter(8,fc1,'high');
z=filter(b,a,x);
fc=300;
fc1=fc/(0.5*Fs);
[b,a] = butter(8,fc1,'low');
z=filter(b,a,z);
ya=fft(z);
figure
stem(abs(ya).^2)

También podría gustarte