Академический Документы
Профессиональный Документы
Культура Документы
t=[-2, -1,-1, 1, 1, 3, 3, 4]
x=[0 , 0, 1, 1,-1,-1, 0, 0]
plot(t,x,)
axis([-2 4 -2 2])
xlabel ('Time (seg) ' )
ylabel('x(t)')
t1=[0 1];
x1=[0 0];
t2=1:.01:2;
x2=2*(t2-1);
t3=[2 3];
x3=[2 2];
t4=3:.01:5;
x4=2*t4-4;
t=[t1 t2 t3 t4];
x=[x1 x2 x3 x4];
plot(t,x)
axis([0 5 -1 7])
xlabel ('Tiempo (seg) ' )
ylabel('x(t)')
1.5 Utilice MATLAB para graficar las siguientes señales, sobre el intervalo de −1 ≤ 𝑡 ≤ 5
t1=-1:.05:pi;
x1=cos(t1);
t2=pi:.05:3*pi/2;
x2=-cos(t2);
t3=[3*pi/2 5];
x3=[0 0];
t=[t1 t2 t3];
x=[x1 x2 x3];
plot(t,x);
axis([-1 5 -1.5 1.5])
1.7 Verifique las gráficas de los incisos (a) a (i) mediante MATLAB,con el comando stem,
stem(n,x,’filled’) .Etiquete sus ejes de manera apropiada.
for n=1:5;
u(n)=0;
end;
for n=6:21;
u(n)=1;
end;
n=-5:15;
stem(n,u,'filled')
axis([-5 15 0 2])
xlabel('n')
ylabel('u[n]')
for n=1:5;
x(n)=0;
end;
for n=6:21;
x(n)=n-6;
end;
n=-5:15;
stem(n,x,'filled')
xlabel('n')
ylabel('r[n]')
c) 𝑥[𝑛] = (0.5)𝑛 𝑢[𝑛]
for n=1:5;
x(n)=0;
end;
for n=6:21;
x(n)=.5^(n-6);
end;
n=-5:15;
stem(n,x,'filled')
xlabel('n');
ylabel('x[n]')
d) 𝑥[𝑛] = (−0.5)𝑛 𝑢[𝑛]
for n=1:5;
x(n)=0;
end;
for n=6:21;
x(n)=(-.5)^(n-6);
end;
n=-5:15;
stem(n,x,'filled')
xlabel('n')
ylabel('x[n]')
e) 𝑥[𝑛] = 2𝑛 𝑢[𝑛]
for n=1:5;
x(n)=0;
end;
for n=6:21;
x(n)=2^(n-6);
end;
n=-5:15;
stem(n,x,'filled')
xlabel('n')
ylabel('x[n]')
f) 𝑥[𝑛] = 𝑠𝑒𝑛(𝜋𝑛/4)
n=-5:15;
x=sin(pi*n/4);
stem(n,x,'filled')
xlabel('n')
ylabel('x[n]')
𝜋𝑛
g) 𝑥[𝑛] = 𝑠𝑒𝑛 ( 2 )
n=-5:15;
x=sin(pi*n/2);
stem(n,x,'filled')
xlabel('n')
ylabel('x[n]')
n=-5:15;
x=(.9.^n).*(sin(pi*n/4)+cos(pi*n/4));
stem(n,x,'filled')
xlabel('n')
ylabel('x[n]')
1, − 4 ≤ 𝑛 ≤ 4
i) 𝑥[𝑛] = {
0, 𝑒𝑛 𝑜𝑡𝑟𝑜 𝑐𝑎𝑠𝑜
u(1)=0;
for n=2:10;
u(n)=1;
end;
for n=11:21;
u(n)=0;
end;
n=-5:15;
stem(n,u,'filled')
axis([-5 15 0 2])
xlabel('n')
ylabel('x[n]')