Lab1 PROPIEDADES DE LAS SEÑALES
Lab1 PROPIEDADES DE LAS SEÑALES
Lab1 PROPIEDADES DE LAS SEÑALES
2019
LABORATORIO 1
I. SOFTWARE USADO
GNU Octave
II. PROCEDIMIENTO
a) X1(t) = u(t)
>> u=[zeros(1,10),ones(1,11)]
u=
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1
>> t=-10:1:10
t=
Columns 1 through 19:
-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8
Columns 20 and 21:
9 10
>> plot(t,u)
>> axis ([-10 10 -1 2])
LABORATORIO 1
b) .
c)
t=-10:0.1:10;
f =((t>-2)&(t<0)).*(2+t)+((t>=0)&(t<5)).*(2-0.5*t);
plot (t,f);
xlabel('x')
ylabel('f(x)')
LABORATORIO 1
d)
t=-10:1:10;
f= ((t>=-3)&(t<=3)).*(1- (abs(t)/3));
plot(t,f)
axis ([-10 10 -1 2])
e) x5= e-2|t|
t = -10:0.1:10;
f = exp(-2*abs(t));
plot (t,f);
LABORATORIO 1
En Octave:
>>A=2
>>p=7
>>w=2*pi/p
>>t=0:0.001:14
>>coseno=A*cos(w*t)
>> plot(t,coseno)
>> xlabel('tiempo(seg)')
>> ylabel('amplitud')
En Octave:
A=3
p=5
w=2*pi/p
t=0:0.01:15
seno =A*sin(w*t)
plot(t,seno)
axis ([0 15 -3 3])
xlabel('tiempo(seg)')
ylabel('amplitud')
LABORATORIO 1
4. Generar una señal cuadrada, con valores entre [0,1], con un duty cicle
de 65%. La señal debe ser de periodo 2pi. Mostrar en pantalla 3
periodos.
A=1;
w = (2*pi)/(2*pi);
t=0:0.001:0.25;
sq= A* square(w*t,65);
plot (t,sq)
A=3;
p=2;
w=2*pi/p;
t=0:0.01:6;
seno =A*sin(w*t);
f= (seno >=0).*(A*sin(w*t));
plot(t,f);
axis ([0 6 -3 4]);
xlabel('tiempo(seg)')
ylabel('amplitud')
LABORATORIO 1
A=2;
p=1.5;
w=2*pi/p;
t=0:0.01:6;
seno =A*sin(w*t);
f= abs(seno);
plot(t,f);
axis ([0 6 -3 4]);
xlabel('tiempo(seg)')
ylabel('amplitud')
LABORATORIO 1
a)
t=-3:0.01:3;
x1=((t>=-2)&(t<-0.5)).*((3/1.5)*(-t-0.5));
x2=((t>=-0.5)&(t<1)).*((6/1.5)*(t+0.5));
x3=((t>=1)&(t<2)).*(3);
x4=((t>=2)&(t<=3)).*((3)*(-t)+9);
f=x1+x2+x3+x4;
plot (t,f);
LABORATORIO 1
b)
t=-9:0.01:9;
f=((t>-4)&(t<=8)).*((10/12)*(-t+8));
plot (t,f+10);
c) –
t = -4: 0.001: 4;
f= y1 + y2
plot (t,f );
xlabel ('t');
ylabel ('Amplitud');
grid on;
axis ([-4, 4, 0, 6]); % Área de dibujo
LABORATORIO 1
d) .
En este grafico no se puede hallar de manera visual
y rápida la forma de la función del grafico
exponencial para lo cual se hace uso de cálculos
matemáticos.
𝑌 = 𝐴 ∗ 𝑒 𝐵𝑋
Corremos la función al inicio de los ejes
Y= 0.4 X=0
Y= 0.2 X=1
Reemplazando:
0.4 = 𝐴 ∗ 𝑒 0
0.4 = 𝐴
1/2 = 𝑒 𝐵
1
𝐿𝑛 ( ) = 𝐿𝑛(𝑒 𝐵 )
2
1
𝐵 = 𝐿𝑛 ( )
2
1
𝑋∗ 𝐿𝑛( )
𝑌 = 0.4 ∗ 𝑒 2
1
𝑌 = 0.4 ∗ ( )𝑋
2
LABORATORIO 1
CODIGO:
t=-10:0.01:10;
%y= A* exp(B*t)
A = 0.4;
B= 0.5; %Coeficiente de la exponencial
y= A*(B .^(t-2));
y1 =(t>=2).*(-0.4+y); % Función
III. BIBLIOGRAFIA
https://es.slideshare.net/elagus123/seales-de-tiempo-continuo-y-discreto-
matlab
http://5minutosdematlab.blogspot.com/2011/09/ejemplos-de-codigo-
para-formar-senales.html
http://enrique.sanchez.webs.uvigo.es/PDFs/211_Matlab-senales.pdf
http://www.sc.ehu.es/sbweb/fisica3/basico/funcion/funcion.html