Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Facultad de Ingeniera
Definimos en archivos m las funciones Escaln Unitario y Rampa Unitaria de la siguiente manera:
%Escaln Unitario En Tiempo Continuo
function u=u(t)
u=+1.*(t>=0);
%Rampa Unitaria en Tiempo Continuo
function u=r(t)
u=+t.*(t>=0);
%Escaln Unitario En Tiempo Discreto
function u=ud(n)
u=+1.*(n>=0);
%Rampa Unitario En Tiempo Discreto
function u=rd(n)
u=+n.*(n>=0);
a. t=-10:0.001:10;
plot(t,u(t)+u(t+1)-2.*u(t-3)); axis([-2 5 -1 3]);
xlabel('t'); ylabel('x(t)')
grid;
3
2.5
x(t)
1.5
0.5
-0.5
-1
-2
-1
2
t
b. t=-10:0.001:10;
plot(t,r(t+3)-r(t+1)-2.*u(t+1)+r(t+1)-2.*r(t-1)+r(t-3));
axis([-4 4 -1 3]); xlabel('t'); ylabel('x(t)')
grid;
3
2.5
2
x(t)
1.5
1
0.5
0
-0.5
-1
-4
-3
-2
-1
0
t
c. n=-15:15;
stem(n,rd(n)-2.*rd(n-2)); axis([-2 10 -5 4]);
xlabel('t'); ylabel('x[n]')
grid;
4
3
2
1
x[n]
0
-1
-2
-3
-4
-5
-2
4
t
10
d. n=-15:15;
x1=ud(n+2)-ud(n-3);
stem(n,x1); axis([-5 5 -1 2]); xlabel('t');
ylabel('x[n]'); grid
2
1.5
x[n]
0.5
-0.5
-1
-5
-4
-3
-2
-1
0
t
e. n=-15:15;
x2=ud(n)-ud(n-4);
stem(n,x2); axis([-5 5 -1 2]); xlabel('t');
ylabel('x[n]'); grid
1.5
x[n]
0.5
-0.5
-1
-5
-4
-3
-2
-1
0
t
f. n=-15:15;
x3=x1+x2;
stem(n,x3); axis([-5 5 -1 3]); xlabel('t');
ylabel('x[n]'); grid
3
2.5
x[n]
1.5
0.5
-0.5
-1
-5
-4
a. ( )
-3
-2
-1
0
t
b. u.m
%Escaln Unitario En Tiempo Continuo
function u=u(t)
u=+1.*(t>=0);
t=-10:0.001:10;
plot(t,u(t+2.5)+u(t+1.5)-u(t-1.5)-u(t-2.5));
axis([-3 3 -0.5 2.5]); xlabel('t'); ylabel('x(t)')
grid
2.5
x(t)
1.5
0.5
-0.5
-3
-2
-1
0
t
a. t=-10:0.001:10;
plot(t,ejercicio3(t-1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
b. t=-10:0.001:10;
plot(t,ejercicio3(t+1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
c. t=-10:0.001:10;
plot(t,ejercicio3(-t-1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
d. t=-10:0.001:10;
plot(t,ejercicio3(-t+1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
e. t=-10:0.001:10;
plot(t,ejercicio3(-2.*t-1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
f. t=-10:0.001:10;
plot(t,ejercicio3(-(t/2)-1)); axis([-10 10 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-10
-8
-6
-4
-2
0
t
10
t=-10:0.001:10;
plot(t,r(t+3)-r(t+1)-r(t-1)+r(t-3)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
b. t=-10:0.001:10;
plot(t,ejercicio4(t+1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
c. t=-10:0.001:10;
plot(t,ejercicio4(-t-1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
d. t=-10:0.001:10;
plot(t,ejercicio4(-t+1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
e. t=-10:0.001:10;
plot(t,ejercicio4(-2.*t-1)); axis([-5 5 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-5
-4
-3
-2
-1
0
t
f. t=-10:0.001:10;
plot(t,ejercicio4(-(t/2)-1)); axis([-10 10 -0.5 2.5]);
xlabel('t'); ylabel('x(t)'); grid
2.5
x(t)
1.5
0.5
-0.5
-10
-8
-6
-4
-2
0
t
10
( )
function c=x5(n)
a=2*ramp(n+4).*(n<-1);
b=8*rect(n,2);
c=a+b;
..
n=-15:15;
x=x5(n);
stem(n,x)
( )
( )
n=-15:15;
x=x5(n);
x_n=x5(-n);
xpar=0.5*(x+x_n);
ximpar=0.5*(x-x_n);
subplot(221); stem(n,x); axis([-15 15 -4 8]); title('X')
subplot(222); stem(n,xpar); axis([-15 15 -4 8]); title('Xpar')
subplot(223); stem(n,ximpar); axis([-15 15 -4 8]); title('Ximpar')
subplot(224); stem(n,ximpar+xpar); axis([-15 15 -4 8]); title('Xpar +
Ximpar')
function c=x5(n)
a=2*rs(n+4).*(n<-1);
b=8*rect(n,2);
c=a+b;
a. function fun1=x1(n)
fun1=+ud(n+2)-ud(n-3);
function fun2=y1[n]
fun2=x1(n+1)+x1(-n+1);
n=-7:7;
stem(n,y1(n));
axis([-7 7 -2 4]);
grid
xlabel('[n]');ylabel('y[n]')
4
y[n]
-1
-2
-6
-4
-2
0
[n]
b. function fun3=x2(n)
fun3=+ud(n)-ud(n-4);
function fun4=y2(n)
fun4=+x2(n+1)+x2(-n+1);
n=-7:7;
stem(n,y2(n)); axis([-7 7 -2 4]); grid;
xlabel('[n]');ylabel('y[n]')
4
y[n]
-1
-2
-6
-4
-2
0
[n]
c. function fun1=x1(n)
fun1=+ud(n+2)-ud(n3);
function fun3=x2(n)
fun3=+ud(n)-ud(n-4);
y[n]
function fun5=x3(n)
fun5=+x1(n)+x2(n));
-1
function fun6=y3(n)
fun6=+x3(n+1)+x3(n+1);
n=-7:7;
-2
-6
-4
-2
0
[n]
stem(n,y3(n));
axis([-7 7 -2 4]);
grid
xlabel('[n]');ylabel('y[n]')
d. function esc=ud(n)
esc=+1.*(n>=0);
function fun1=x1(n)
fun1=+ud(n+2)-ud(n-3);
function fun2=y1(n)
fun2=+x2(n+1)+x2(n+1);
y[n]
function fun3=x2(n)
fun3=+ud(n)-ud(n-4);
-1
-2
-6
-4
-2
0
[n]
n=-7:7;
stem(n,y1(n)+y2(n));
axis([-7 7 -2 4]);
grid
xlabel('[n]');ylabel('y[n]')
e. Que concluye?
Al ser los resultados de los dos procesos iguales significa
que estamos ante un sistema lineal debido a que cumple con la
caracterstica de aditividad, tambin conocida como teorema
de superposicin.
function fun1=x1(n)
fun1=+ud(n+2)ud(n-3);
n=-7:7;
stem(n,y4(n));
axis([-7 7 -1 2]);
grid
xlabel('[n]');ylabe
l('y[n]')
y[n]
function fun2=y4(n)
fun2=+x1(n+1).*x1(n+1);
1.5
0.5
-0.5
-1
-6
-4
-2
0
[n]
1.5
function fun6=y5(n)
fun6=+x2(n+1).*x2(n+1);
y[n]
function fun3=x2(n)
fun3=+ud(n)-ud(n4);
0.5
-0.5
-1
n=-7:7;
stem(n,y5(n));
axis([-7 7 -1 2]);
grid
xlabel('[n]');ylabe
l('y[n]')
-6
-4
-2
0
[n]
[ ]
[ ]
4
3.5
3
function fun5=x3(n)
fun5=+x1(n)+x2(n);
2.5
function fun7=y6(n)
fun7=+x3(n+1).*x3(n+1);
y[n]
2
1.5
1
0.5
0
n=-7:7;
stem(n,y6(n));
axis([-7 7 -1 2]);
grid
xlabel('[n]');ylabe
l('y[n]')
-0.5
-1
-6
-4
-2
0
[n]
function fun1=x1(n)
fun1=+ud(n+2)ud(n-3);
function fun2=y4(n)
fun2=+x1(n+1).*x1(n+1);
function fun6=y5(n)
fun6=+x2(n+1).*x2(n+1);
y[n]
function fun3=x2(n)
fun3=+ud(n)-ud(n4);
-1
-2
-6
-4
-2
0
[n]
n=-7:7;
stem(n,y4(n)+y5(n))
;
axis([-7 7 -2 4]);
grid
xlabel('[n]');ylabe
l('y[n]')
e. Qu concluye?
Al no cumplir con el principio superposicin, ste es un
sistema no lineal.
t=-10:0.1:10;
i=0;
di=0;
for i=-1000:1000,
di=di+dirac(t-(4.*i));
end
plot(t,di); grid; axis([ -10 10 -.3 .5]);
Cdigo:
n=[-10:.1:10];
y1=cos(2*pi*n./5+pi./4)+cos(2*pi*n./3+pi./4);
y2=cos(2*pi*n./5)+cos(2*pi*n./3);
y3=cos(2*n./5+pi./4)+cos(2*pi*n./3+pi./4);
y4=cos(2*pi*n./5+pi./4)+cos(2*n./3+pi./4);
subplot(221),stem(n./1,y1,'.');grid;title('Ejercicio
inciso a)')
subplot(222),stem(n./1,y2,'.');grid;title('Ejercicio
inciso b)')
subplot(223),stem(n./1,y3,'.');grid;title('Ejercicio
inciso c)')
subplot(224),stem(n./1,y4,'.');grid;title('Ejercicio
inciso d)')
a) Seal peridica con T=15
b) Seal peridica con T=15
10
10
10
10
c) Aperidica
d) Aperidica
n=[-15:.1:15];
y1=sin(pi*n./2)+sin(pi*n./4);
y2=sin(pi*n./2-pi./2)+sin(pi*n./4-pi./2);
y3=cos(pi*n./2)+cos(pi*n./4);
y4=cos(pi*n./2-pi./3)+cos(pi*n./4-pi./3);
subplot(221),stem(n./1,y1,'.');grid;title('Periodica
subplot(222),stem(n./1,y2,'.');grid;title('Periodica
subplot(223),stem(n./1,y3,'.');grid;title('Periodica
subplot(224),stem(n./1,y4,'.');grid;title('Periodica
El periodo en todas las funciones es de T=8 unidades
a)')
b)')
c)')
d)')
y(t)=
)=
) (
) =
[ ]
n=-8:8;
x=rect_per(n-1,2,6);
stem(n,x); title('Ejercicio 13');
axis([-8 8 -.5 1.5])
function re=rect_per(n,Nw,N)
re=0;
for i=min(n):max(n)
re=re+(1.*(abs(n-N*i)<Nw));
end
t=-5:.0001:5;
x=aprox(t,0.0001);
plot(t,x);
function in=aprox(t,e)
in=(2/e^2)*ramp(t+e/2).*(abs(t)<e/2);
function r=ramp(t)
r=t.*(t>=0);
t=-5:.001:5;
x=xs(t,50000);
plot(t,x)
function eq=xs(t,k)
y=0;
for i=0:k
aux=(-1)^i+2*i*(-1)^i;
y=y+((2/(pi*aux)))*cos(aux*pi*0.5.*t)
;
end
eq=0.5+y;