Escolar Documentos
Profissional Documentos
Cultura Documentos
SAN AGUSTIN
Circuitos Eléctricos II
Tema: Entorno MATLAB
Alumnos:
Falero Montes, Steven Omir CUI: 20133068
Quirita Huamanquispe, Frank CUI: 20130468
Arequipa-Perú
2015
Procedimiento.
1. Uso del HELP
1.1 Con ayuda del HELP de MATLAB explique al detalle lo siguiente.
1.1.1 >>A=rand(6); B=inv(A); B*A
>> A=rand(6)
A=
>> B=inv(A)
B=
>> B*A
ans =
>> y=sin(x);
>> plot(x,y),grid on,title('Función seno de X')
>> A=rand(6);
>> x=[1;1;1;1;1;1];
>> b=A*x
b=
3.3034
2.0545
2.7465
3.6528
2.5215
2.9469
2.1 Digite>>demo , seleccione Continue, Matlab, visit, Matrices, Select Demo, Start
para observar cómo se emplea Matlab en operaciones elementales y
amtriciales.
t=
Columns 1 through 13
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000
0.9000 1.0000 1.1000 1.2000
Columns 14 through 26
1.3000 1.4000 1.5000 1.6000 1.7000 1.8000 1.9000 2.0000 2.1000
2.2000 2.3000 2.4000 2.5000
Columns 27 through 39
2.6000 2.7000 2.8000 2.9000 3.0000 3.1000 3.2000 3.3000 3.4000
3.5000 3.6000 3.7000 3.8000
Columns 40 through 52
3.9000 4.0000 4.1000 4.2000 4.3000 4.4000 4.5000 4.6000 4.7000
4.8000 4.9000 5.0000 5.1000
Columns 53 through 65
5.2000 5.3000 5.4000 5.5000 5.6000 5.7000 5.8000 5.9000 6.0000
6.1000 6.2000 6.3000 6.4000
Columns 66 through 78
6.5000 6.6000 6.7000 6.8000 6.9000 7.0000 7.1000 7.2000 7.3000
7.4000 7.5000 7.6000 7.7000
Columns 79 through 91
7.8000 7.9000 8.0000 8.1000 8.2000 8.3000 8.4000 8.5000 8.6000
8.7000 8.8000 8.9000 9.0000
Columns 92 through 101
9.1000 9.2000 9.3000 9.4000 9.5000 9.6000 9.7000 9.8000 9.9000
10.0000
t=
0 1 2 3 4 5 6 7 8 9 10
Columns 1 through 13
0 0.1010 0.2020 0.3030 0.4040 0.5051 0.6061 0.7071 0.8081
0.9091 1.0101 1.1111 1.2121
Columns 14 through 26
1.3131 1.4141 1.5152 1.6162 1.7172 1.8182 1.9192 2.0202
2.1212 2.2222 2.3232 2.4242 2.5253
Columns 27 through 39
2.6263 2.7273 2.8283 2.9293 3.0303 3.1313 3.2323 3.3333
3.4343 3.5354 3.6364 3.7374 3.8384
Columns 40 through 52
3.9394 4.0404 4.1414 4.2424 4.3434 4.4444 4.5455 4.6465
4.7475 4.8485 4.9495 5.0505 5.1515
Columns 53 through 65
5.2525 5.3535 5.4545 5.5556 5.6566 5.7576 5.8586 5.9596
6.0606 6.1616 6.2626 6.3636 6.4646
Columns 66 through 78
6.5657 6.6667 6.7677 6.8687 6.9697 7.0707 7.1717 7.2727
7.3737 7.4747 7.5758 7.6768 7.7778
Columns 79 through 91
7.8788 7.9798 8.0808 8.1818 8.2828 8.3838 8.4848 8.5859
8.6869 8.7879 8.8889 8.9899 9.0909
Columns 92 through 100
9.1919 9.2929 9.3939 9.4949 9.5960 9.6970 9.7980 9.8990
10.0000
t1 =
Columns 1 through 13
1.0000 1.0985 1.2068 1.3257 1.4563 1.5999 1.7575 1.9307
2.1210 2.3300 2.5595 2.8118 3.0888
Columns 14 through 26
3.3932 3.7276 4.0949 4.4984 4.9417 5.4287 5.9636 6.5513
7.1969 7.9060 8.6851 9.5410 10.4811
Columns 27 through 39
11.5140 12.6486 13.8950 15.2642 16.7683 18.4207 20.2359 22.2300
24.4205 26.8270 29.4705 32.3746 35.5648
Columns 40 through 50
39.0694 42.9193 47.1487 51.7947 56.8987 62.5055 68.6649 75.4312
82.8643 91.0298 100.0000
2.9 Los polinomios se representan en Matlab como vectores fila que contienen los
coeficientes ordenados en potencias descendentes. Por ejemplo p(s)=s^3 +
2*s^2 + 3*s + 4 se representa como: p=[1 2 3 4]
>> p=[1 2 3 4]
p=
1 2 3 4
2.10 >>r=roots(p) encuentra las raíces del polinomio
r=
-1.6506 + 0.0000i
-0.1747 + 1.5469i
-0.1747 - 1.5469i
p2 =
1 3 2
ans =
39.6250
2.15 La forma básica del comando plot es plot(y) que produce una gráfica de los
valores del vector y con sus respectivos índices
>> x=0:0.05:5;
>> y=sin(x.^2);
>> plot(x,y)
2.17 Podemos graficar múltiples curvas con el comando plot
>> x=0:0.05:5;
>> y=sin(x.^2);
>> plot(x,y)
>> plot(y)
>> x1=[0:0.3:10];
>> x2=0:0.3:20;
>> x3=[1:30];
>> y1=sin(x1);
>> y2=cos(x2);
>> y3=log(x3);
>> plot(x1,y1,x2,y2,x3,y3)
2.18 La pantalla puede ser subdividida en subventanas en un máximo de 4 con
un subplot(rcp) donde r=número de filas, c=número de columnas, p=ventana
activa
>> x=0:0.5:100;
>> y1=sin(x);
>> y2=sec(x);
>> subplot(2,1,1)
>> plot(y1)
>> subplot(2,1,2)
>> plot(y2)
2.19 Podemos graficar múltiples curvas con diferentes escalas logarítmicas y
lineales empleando el comando subplot
>> x=0:0.5:50;
>> y=5*x.^2;
>> subplot(2,2,1)
>> plot(x,y),title('Polinomio lineal/lineal'),grid on,ylabel('y')
>> subplot(2,2,2)
>> semilogx(x,y),title('Polinomio - log/lineal'),grid on,ylabel('y')
>> subplot(2,2,3)
>> semilogy(x,y),title('Polinomio - lineal/log'),grid on,xlabel('x'),ylabel('y')
>> subplot(2,2,4)
>> loglog(x,y),title('Polinomio - log/log'),grid on, xlabel('x'),ylabel('y')
3. Aplicación de MATLAB en la gráfica de Señales Singulares.
>> a=[1];
>> b=[1 2 3];
>> impulse
num =
den =
den =