Lab7 Victor Viveros
Lab7 Victor Viveros
C.I.P 8-854-324
Tema: Lab.#7
%P02.
df= 1;
N = 1024;
at = [0 0.03];
af = [-600 600];
t =(0:N-1)*dt;
t1 =(0:N-1)*dt1;
t1 =(0:N-1)*dt1;
t1 =(0:N-1)*dt1;
t1 =(0:N-1)*dt1;
%P03.
Fs = 10*10^3;
t2 = -5*10^-3:1/Fs2:5*10^-3; t3 = -5*10^-3:1/Fs3:5*10^-3;
f = Fs/2*linspace(-1,1,length(t));
x3 = (2).*(sin(625*pi*t3 +pi/3)).^2;
Fs = 1000;
t = 0:1/Fs:0.601;
x1 = cos(20*pi*t +pi/4);
subplot(4,2,1);plot(t,x1,'-r','linewidth',3);grid;hold on;
x = 0;
for k=0:5;
x1 = ((1/2)^k)*sin(k*pi*t); x = x + x1;
endfor
ts = -6:T:6;
y = downsample(x,10); h = sinc(ts.*pi/T);
g = conv(y,h,'same');
f = Fs/2*linspace(-1,1,length(t));
fs = Fs1/2*linspace(-1,1,length(ts)); af = [-3 3];
subplot(2,2,1);plot(t,x,'-r','linewidth',3,ts,g,'-b');grid;
subplot(2,2,2);plot(f,fftshift(Xabs),'-k');grid;axis(af)
title('P06. X(jw)');xlabel('w');
subplot(2,2,3);plot(ts,y,'linewidth',3,'-g');grid;
title('P06. y(t)');xlabel('t');
subplot(2,2,4);plot(fs,fftshift(Yabs),'-k',fs,fftshift(Habs),'-b','linewidth',2);grid;axis(af) title('P06.
Y(jw) y H(jw)');xlabel('w');
P07.Insección de ceros y decimación
n = -10:10;
w1 = 2*pi/5; w2 = 4*pi/5;
n = -30:32;
h = sinc(pi*n/5);
n = -6:6;