Académique Documents
Professionnel Documents
Culture Documents
09/09/14
Seales y Sistemas
Prctica 1
Introduccin:
En esta prctica se reafirman los conceptos de funciones elementales y su graficacin mediante la
creacin de rutinas en Matlab que sean capaces de generar un vector numrico con el cual se
pueda graficar dicha funcin.
Procedimiento:
Cre las rutinas para generar las funciones vistas en clase y compar las grficas con las que
genera Matlab con sus propias funciones.
Heaviside
Valor(y)
-1
-3
-2
-1
0
Tiempo(t)
-2
-1
0
Tiempo(t)
Valor(y)
-1
-3
09/09/14
Seales y Sistemas
1.5
Valor(y)
0.5
-0.5
-1
-2
10
-1
10
10
Tiempo(t)
0.3
10
0.2
10
0.1
Valor(y)
10
10
-0.1
10
-0.2
10
-0.3
10
-2
10
-1
10
10
Tiempo(t)
09/09/14
Seales y Sistemas
Pulso triangular
Valor(y)
-1
-3
-2
-1
0
Tiempo(t)
-2
-1
0
Tiempo(t)
Valor(y)
-1
-3
1.5
Valor(y)
0.5
-0.5
-1
-2
10
-1
10
10
Tiempo(t)
09/09/14
Seales y Sistemas
Valor(y)
10
-1
10
-2
10
-2
-1
10
10
10
Tiempo(t)
Pulso rectangular
Valor(y)
-1
-3
-2
-1
0
Tiempo(t)
-2
-1
0
Tiempo(t)
Valor(y)
-1
-3
09/09/14
Seales y Sistemas
1.5
Valor(y)
0.5
-0.5
-1
-2
10
-1
10
10
Tiempo(t)
0.3
10
0.2
Valor(y)
10
0.1
10
10
-2
10
-1
10
10
Tiempo(t)
09/09/14
Seales y Sistemas
Signum
2
1.5
1
Valor(y)
0.5
0
-0.5
-1
-1.5
-2
-3
-2
-1
0
Tiempo(t)
2
1.5
1
Valor(y)
0.5
0
-0.5
-1
-1.5
-2
-2
10
-1
10
10
Tiempo(t)
09/09/14
Seales y Sistemas
0.3
10
0.2
Valor(y)
10
0.1
10
10
-2
10
-1
10
10
Tiempo(t)
Rutinas
%Funcin main que hace uso de las rutinas generadas para la prctica 1
%de Seales y Sitemas (funciones elementales).
%Parmetros iniciales
lim=3;
%Lmite del tiempo (-lim,lim)
a=2;
%Cruce con el eje x o perodo
xs=-lim:0.01:lim;
%Vector de tiempo
%Heaviside
y=SySHeaviside(xs,0);
ym=heaviside(xs);
subplot(2,1,1)
%Divide figure en 2
graphFunction(lim,xs,y);
%Funcin creada por m
subplot(2,1,2)
graphFunction(lim,xs,ym);
figure
semilogXFunction(lim, xs,y); %Funcin creada por m
figure
semilogFunction(lim,xs,y);
pause
09/09/14
Seales y Sistemas
close figure 1 2 3
%Triangular
y=SySTriangular(xs,a);
ym=triangularPulse(-a,a,xs);
subplot(2,1,1)
graphFunction(lim,xs,y);
subplot(2,1,2)
graphFunction(lim,xs,ym);
figure
semilogXFunction(lim, xs,y);
figure
semilogFunction(lim,xs,y);
pause
close figure 1 2 3
%RectangularPulse
y=SySRectangular(xs,a);
ym=rectangularPulse(-a/2,a/2,xs);
subplot(2,1,1)
graphFunction(lim,xs,y);
subplot(2,1,2)
graphFunction(lim,xs,ym);
figure
semilogXFunction(lim, xs,y);
figure
semilogFunction(lim,xs,y);
pause
close figure 1 2 3
%Signum
y=SySSignum(xs);
graphFunction(lim,xs,y);
figure
semilogXFunction(lim, xs,y);
09/09/14
Seales y Sistemas
figure
semilogFunction(lim,xs,y);
pause
close figure 1 2 3
grid MINOR
void=0;
grid MINOR
void=0;
%Funcin que grafica una funcin bidimensional,
09/09/14
Seales y Sistemas
grid MINOR
void=0;
09/09/14
Seales y Sistemas