ex1: started.

This commit is contained in:
rainydaysavings 2020-10-01 15:59:02 +01:00 committed by Diogo Cordeiro
parent 46b9d9604b
commit 763699f4d7
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
% Exercício 1
impulso = zeros(1,41);
impulso(21) = 1;
degrau = (n>=0);
n = -20:20;
x = fun_x(n);
figure
stem(n, x)
figure
stem(n, impulso)
figure
stem(n, degrau)
function p = fun_x(N)
A=1.8;
f=0.05;
phi=0.5*pi;
p=A*cos(2*pi*f*N+phi);
end