Escolar Documentos
Profissional Documentos
Cultura Documentos
DISCENTES:
LUCAS PEREIRA SOUZA DOS SANTOS
ALLAN MATHEUS NERY PEREIRA
Disciplina Laboratório Integrado II (ENG466)
Semestre 2022.2
% Apresentacao
subplot(2,2,1)
plot(t,xc,"linewidth",2,"color","r")
grid
%axis([TI TF -0.1 1.1])
subplot(2,2,2)
plot(t,yc, "linewidth",2,"color","r")
grid
%axis([TI TF -0.1 1.1])
subplot(2,2,3)
stem(n,x)
grid
%axis([NI NF -0.1 1.1])
subplot(2,2,4)
stem(n,y)
grid
%axis([NI NF -0.1 1.1])
Questão ii. Crie um script no Octave para simular a equação de diferença obtida
na Tarefa II, aplicando as entradas e condições iniciais especificadas na Tarefa
III, obtendo a saída resultante. Considere a taxa de amostragem igual,
inicialmente, a 50 MHz. O intervalo de tempo discreto pode corresponder aos
instantes positivos (zero incluso) correspondentes ao que foi especificado na
Figura 3 da Tarefa I.
% Sinais Discretos
n = 0:NF; % tempo discreto
m = length(n); % numero de amostras de n
x = zeros(1, m); % x[n] = 0, 0 <= n <= NF
y = zeros(1, m); % inicializacao para eficiencia
y(1) = (ALFA*YI)-(ALFA*XI); % y[0] = alfa*y[-1] + ALFA*(-x(-1))
% Equacao de Diferenca
for i = 2:m % 1 <= n <= NF
y(i) = ALFA*y(i-1) + ALFA*(x(i)-x(i-1));
endfor
% Apresentacao
subplot(2,2,1)
plot(t, xc, "linewidth", 2, "color", "r")
grid
%axis([0 TF -0.1 1.1])
subplot(2,2,2)
plot(t, yc, "linewidth", 2, "color", "r")
grid
%axis([0 TF -0.1 1.1])
subplot(2,2,3)
stem(n, x , "linewidth", 2)
grid
%axis([0 NF -0.1 1.1])
subplot(2,2,4)
stem(n, y, "linewidth", 2)
grid
%axis([0 NF -0.1 1.1])
Simulação contínua:
Simulações discretas:
Simulação contínua: