This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
DSP/TP1b/DiogoEliseuHugo_TP2_11.m
2020-10-24 18:20:32 +01:00

20 lines
459 B
Matlab

%% Inicialização do ambiente
clear ; close all; clc
%% Exercício 11
n = 0:255;
x = cos(20*pi*n/256)+cos(200*pi*n/256);
cx1 = [0.5,0.4,0.3];
y1 = filter(cx1,1,x);
cx2 = [0.4,0.5,0.4];
cy2 = [1,-0.5,0.4];
y2 = filter(cx2,cy2,x);
subplot(3,1,1),plot(n,x)
xlabel('n'),ylabel('Amplitude'),title('x[n]')
subplot(3,1,2),plot(n,y1)
xlabel('n'),ylabel('Amplitude'),title('y1[n]')
subplot(3,1,3),plot(n,y2)
xlabel('n'),ylabel('Amplitude'),title('y2[n]')