View
12
Download
0
Category
Preview:
DESCRIPTION
Intro
Citation preview
UNIVERSIDAD NACIONAL
MAYOR DE SAN MARCOS
(Universidad del Per, Decana de Amrica)
FACULTAD DE INGENIERA ELECTRNICA Y ELECTRCA
INFORME N1
Curso : Introduccin a las Telecomunicaciones
Integrante : 10190082 Osorio Miranda, Kevin
2015
EXPERIENCIA N 1: PROCESAMIENTO DE SEALES Y FUNCIONES
PERIODICAS USANDO MATLAB
I. OBJETIVO:
Simular e investigar en forma experimental el procesamiento de seales usando los comandos e instrucciones del software MATLAB, desarrollando los ejercicios propuestos en funcin de los ejercicios planteados.
II. EQUIPOS Y MATERIALES:
1. MATLAB 2. PC Pentium II-actual. 3. Manual de MATLAB.
III. PROCEDIMIENTO:
1. Desarrolle en el programa principal de MATLAB los siguientes ejemplos y anotar sus resultados.
Funciones matemtica:
>> x=sqrt(2)/2
x = 0.7071
>> y=asin(x)
y = 0.7854
>> y_deg=y*180/pi %convierte grados a radianes
y_deg = 45.0000
>> x=sqrt(3^2+4^2)
x = 5
>> y=rem(23,4)
y = 3
>>
x=2.6,y1=fix(x),y2=floor(x),y3=ceil(x),y4=round(x);
x = 2.6000
y1 = 2
y2 = 2
y3 = 3
Nmeros complejos:
Ejercicio 1
>> a=1;b=5;c=6
c = 6
>> x1=(-b+sqrt(b^2-4*a*c))/(2*a)
x1 = -2
>> x2=(-b-sqrt(b^2-4*a*c))/(2*a)
x2 = -3
>> a*X1^2+b*X1+c;
>> a*X2^2+b*X2+c;
Ejercicio 2
>> a=1,b=4,c=13;
>> x1=(-b+sqrt(b^2-4*a*c))/(2*a)
x1 = -2.0000 + 3.0000i
>> x2=(-b-sqrt(b^2-4*a*c))/(2*a)
x2 = -2.0000 - 3.0000i
>> a*x1^2+b*x1+c
ans = 0
>> a*x2^2+b*x2+c
ans = 0
Ejercicio 3
>> C1=1-2i
C1 = 1.0000 - 2.0000i
>> C1=1-2j
C1 = 1.0000 - 2.0000i
>> C2=3*(2-sqrt(-1)*3)
C2 = 6.0000 - 9.0000i
>> c3=sqrt(-2)
c3 = 0 + 1.4142i
>> c4=6+sin(.5)*i
c4 = 6.0000 + 0.4794i
>> c5=6+sin(.5)*j
c5 = 6.0000 + 0.4794i
Ejercicio 4
>> C1=1-2i
C1 = 1.0000 - 2.0000i
>> mag_c1=abs(c1)
mag_c1 = 2.2361
>> angle_c1=angle(c1)
angle_c1 = -1.1071
>> deg_c1=angle_c1*180/pi
deg_c1 = -63.4349
>> real_c1=real(c1)
real_c1 = 1
>> imag_c1=imag(c1)
imag_c1 = -2
Construccin de arrays
>> x=[0 .1*pi .2*pi .3*pi .4*pi .5*pi .6*pi .7*pi .8*pi
.9*pi pi]
x = Columns 1 through 4
0 0.3142 0.6283 0.9425
Columns 5 through 8
1.2566 1.5708 1.8850 2.1991
Columns 9 through 11
2.5133 2.8274 3.1416
>> y=sin(x)
y = Columns 1 through 4
0 0.3090 0.5878 0.8090
Columns 5 through 8
0.9511 1.0000 0.9511 0.8090
Columns 9 through 11
0.5878 0.3090 0.0000
>> x(1:5),
ans = Columns 1 through 4
0 0.3142 0.6283 0.9425
Column 5
1.2566
>> x=(0:0.1:1)*pi
x = Columns 1 through 4
0 0.3142 0.6283 0.9425
Columns 5 through 8
1.2566 1.5708 1.8850 2.1991
Columns 9 through 11
2.5133 2.8274 3.1416
>> x=linspace(0,pi,11)
x = Columns 1 through 4
0 0.3142 0.6283 0.9425
Columns 5 through 8
1.2566 1.5708 1.8850 2.1991
Columns 9 through 11
2.5133 2.8274 3.1416
Grafica de funciones trigonomtricas
x=linspace(0,4*pi,60);
y=sin(x);
figure(1)
plot(x,y)
z=cos(x);
figure(2)
plot(x,z,x,y)
figure(3)
plot(x,y,x,y,'*')
figure(4)
plot(y,z)
figure(5)
plot(x,y,x,2*y.*z,'--')
grid
xlabel('variable independiente x')
ylabel('variables dependientes')
title('2sen(x)cos(x)sen(2x)')
figure(6)
plot3(y,z,x),grid
Generacin de seales discontinuas
x=linspace(0,16,100);
y=sin(x);
z=(y>=0).*y;
z=z+0.5*(y
IV. Cuestionario
1. Cambie el valor de cada uno de los ejercicios
y desarrolle nuevas aplicaciones
Funciones matemtica
a.
>> x=sqrt(2)/3
x = 0.4714
>> y=acos(x)
y = 1.0799
>> y_deg=y*180/pi% convierte grados a radianes
y_deg = 61.8745
>> x=sqrt(3^2+4^2)
x = 5
>> y=rem(23,4)
y = 3
>>x=2.6,y1=fix(x),y2=floor(x),y3=ceil(x),y4=round(
x);
x = 2.6000
y1 = 2
y2 = 2
y3 = 3
b.
>> x=1/sqrt(3)
x =0.5774
>> y=atan(x)
y =0.5236
>> y_deg=y*180/pi
y_deg =30.0000
>> x=sqrt(7^2+24^2)
x =25
>> y=rem(33,4)
y =1
>> x=7.9
x = 7.9000
>> y1=fix(x)
y1 =7
>> y2=floor(x)
y2 =7
>> y3=ceil(x)
y3 =8
>> y4=round(x)
y4 = 8
Nmeros complejos
a.
>> a=1;b=3;c=5
c = 5
>> x1=(-b+sqrt(b^2-4*a*c))/(2*a)
x1 = -1.5000 + 1.6583i
>> x2=(-b-sqrt(b^2-4*a*c))/(2*a)
x2 = -1.5000 - 1.6583i
b.
>> a=1,b=3,c=12;
>> x1=(-b+sqrt(b^2-4*a*c))/(2*a)
x1 = -1.5000 + 3.1225i
>> x2=(-b-sqrt(b^2-4*a*c))/(2*a)
x2 = -1.5000 - 3.1225i
>> a*x1^2+b*x1+c,
ans = 0
>> a*x2^2+b*x2+c
ans = 0
>> C1=1-2i
C1 = 1.0000 - 2.0000i
>> C1=1-2j
C1 = 1.0000 - 2.0000i
>> C2=3*(2-sqrt(-1)*3)
C2 =6.0000 - 9.0000i
>> c3=sqrt(-2)
c3 =0 + 1.4142i
>> c4=6+sin(.5)*i
c4 =6.0000 + 0.4794i
>> c5=6+sin(.5)*j
c5 =6.0000 + 0.4794i
>> C1=1-2i
C1 =1.0000 - 2.0000i
>> c1=1-2j
c1 =1.0000 - 2.0000i
>> mag_c1=abs(c1)
mag_c1 = 2.2361
>> angle_c1=angle(c1)
angle_c1 = -1.1071
>> deg_c1=angle_c1*180/pi
deg_c1 = -63.4349
>> real_c1=real(c1)
real_c1 = 1
>> imag_c1=imag(c1)
imag_c1 = -2
Construccin de arrays
a.
>> x=[0 .1*90 .2*90 .3*90 .4*90 .5*90 .6*90 .7*90
.8*90 .9*90 90]
x =
Columns 1 through 8
0 9.0000 18.0000 27.0000 36.0000
45.0000 54.0000 63.0000
Columns 9 through 11
72.0000 81.0000 90.0000
>> y=cos(x*pi/180)
y =
Columns 1 through 8
1.0000 0.9877 0.9511 0.8910 0.8090
0.7071 0.5878 0.4540
Columns 9 through 11
0.3090 0.1564 0.0000
>> x(2)
ans =9
>> x(4)
ans =27
>> x(6)
ans =45
b.
>> x=(0:0.1:1)*90
x =
Columns 1 through 8
0 9.0000 18.0000 27.0000 36.0000 45.0000
54.0000 63.0000
Columns 9 through 11
72.0000 81.0000 90.0000
>> x=linspace(0,90,11) % Ambos arrays deben de
ser similares
x =0 9 18 27 36 45 54 63 72 81
90
x=[0 .1*10 .2*10 .3*10 .4*10 .5*10 .6*10 .7*10
.8*10 .9*10 10]
x = 0 1 2 3 4 5 6 7 8 9 10
>> y=cos(x)
y =
Columns 1 through 8
1.0000 0.5403 -0.4161 -0.9900 -0.6536
0.2837 0.9602 0.7539
Columns 9 through 11
-0.1455 -0.9111 -0.8391
>> x(2)
ans = 1
>> x(8)
ans =7
>> x=(0:0.1:1)*10
x =
Columns 1 through 8
0 1.0000 2.0000 3.0000 4.0000 5.0000
6.0000 7.0000
Columns 9 through 11
8.0000 9.0000 10.0000
>> x=linspace(0,10,11) % Ambos arrays deben de
ser similares
x =
0 1 2 3 4 5 6 7 8 9 10
Grafica de funciones trigonomtricas:
a.
x=linspace(0,8*pi,100);
y=sin(x);
figure(1)
plot(x,y)
figure(2)
plot(x,z,x,y)
figure(3)
plot(x,y,x,y,'*')
figure(4)
plot(y,z)
figure(5)
plot(x,y,x,2*y.*z,'--')
grid
xlabel('variable independiente x')
ylabel('variables dependientes')
title('2sen(x)cos(x)sen(2x)')
figure(6)
plot3(y,z,x),grid
b.
>> x=linspace(-10,10,60);
y=x.^2;
figure (1)
plot(x,y)
z=1-x.^2;
figure (2)
plot(x,z,x,y)
figure (3)
plot (x,y,x,y,'+')
figure (4)
plot (y,z)
figure (5)
plot (x,y,x,z,x,y+z,'.')
grid
xlabel('Variable independiente x')
ylabel('variables dependientes')
title('x^2+(1-x^2)=1')
figure(6)
plot3(y,z,x), grid
Generacin de seales discontinuas
a.
x=linspace(0,20,200);
y=sin(x);
z=(y>=0).*y;
z=z+0.5*(y
b.
x=linspace(-4,4,100);
y=x.^2;
z=(y>=4).*y;
z=z+3*(y
a.
x=linspace(0,8*pi,100);
y=sin(x);
z=cos(x);
a=2*sin(x).*cos(x);
b=sin(x)./(cos(x)+eps);
subplot(2,2,1)
plot(x,y),axis([0 4*pi -1 1]),title('sin(x)')
subplot(2,2,2)
plot(x,z),axis([0 4*pi -1 1]),title('cos(x)')
subplot(2,2,3)
plot(x,a),axis([0 4*pi -11]), title('2sin(x)cos(x)')
subplot(2,2,4)
plot(x,b),axis([0 4*pi -40 40]),
title('tg=sin(x)/cos(x)')
b.
x=linspace(-10,10,60);
y=x.^4+3*x.^3+2*x.^2+6*x+1;
z=4*x.^3+9*x.^2+4*x+6;
a=12*x.^2+18*x+4;
b=24*x+18;
subplot(2,2,1)
plot(x,y), axis ([-10 10 -1000 1000]), title ('f(x)')
subplot(2,2,2)
plot(x,z), axis ([-10 10 -1000 1000]), title ('f(x)')
subplot(2,2,3)
plot(x,a), axis ([-10 10 -1000 1000]),title ('f(x)')
subplot(2,2,4)
plot(x,b), axis ([-10 10 -1000 1000]),title ('f(x)')
2. Explique las funciones de cada una de las
principales instrucciones y comandos
utilizados en los ejercicios anteriores.
sqrt(x): obtiene la raz cuadrada de la
variable x
asin(x): obtiene el arcoseno de la variable
x.
rem(x,y): obtiene el residuo de la divisin
x/y.
fix(x): redondea a x hacia cero.
floor(x): redondea a x hacia menos
infinito.
ceil(x): redondea a x hacia infinito.
round(x): redondea a x hacia el entero
ms prximo.
abs(c): obtiene la magnitud del nmero
complejo c.
angle(c): obtiene el ngulo de fase del
nmero complejo c.
real(c): obtiene la parte real del nmero
complejo c.
imag(c): obtiene la parte imaginaria del
nmero complejo c.
x= [0 .1*pi .2*pi .3*pi .4*pi .5*pi .6*pi .7*pi
.8*pi .9*pi pi]: crea un arreglo con los
valores dentro de los corchetes.
y=sin(x): obtiene el seno de cada uno de
los valores de x en el arreglo
anterior.
x(3): accede al tercer elemento del
arreglo x.
y(5): accede al quinto elemento del
arreglo y.
x= (0:0.1:1)*pi: crea un arreglo con
intervalo de 0.1, con primer elemento 0,
ltimo elemento 1, y los
multiplica por .
x=linspace (0, pi, 11): crea un arreglo con
primer elemento 0, ltimo elemento
pi, y contenga en total 11
elementos.
plot(x,y):crea una grfica bidimensional
que coloca en el eje de las abscisas a
los valores de x, y en el eje de
las ordenadas a los valores de y.
plot(x,z,x,y): crea los plot(x,z) y plot(x,y)
simultneamente.
plot(x,y,x,y,*): crea los plot(x,y) y
plot(x,y) simultneamente, este ltimo
formado de *.
plot(x,2*y.*z,--): coloca en el eje de las
ordenadas el doble producto de los
valores de y x z, y forma la
grfica con -.
grid: traza una cuadricula en la grfica .
xlabel(nombre): coloca un nombre al eje
x de la grfica.
ylabel(nombre): coloca un nombre al eje
y de la grfica.
title(titulo): coloca un ttulo al grafico
existente.
plot3(y,z,x): realiza un grafica en tres
dimensiones con los valores de y,z,x.
z=(y>=0).*y: fija a cero los valores
negativos de y.
z=z+0.5*(y
Recommended