View
23
Download
0
Category
Preview:
Citation preview
Oracle virtual box. Maquina virtual para windows xpcubo de comandos: contiene los atajos con el teclado
CLASE DE MATLAB sábado 15/02/2014
Resolver un sistema de ecuaciones utilizando operaciones entre matrices, ejemplo:
Resolver el siguiente sistema de ecuaciones:
3x + 2y -4z=24x + 3y -7z=-1-x +6y + 5z=4
A*S=R (siendo A la matriz de 3x3 de los coeficientes de las variables, S las variables y R las respuestas de las ecuaciones)S= R/A = R . A¬⁻1
INSTRUCCIONES EN MATLAB
A=[3 2 -4; 4 3 -7; -1 6 5]R=[2; -1; 4]B= inv (A)B= A¬-1S= B*R
EJEPLOS DE VECTORES:
3:8 (genera un vector desde 3 hasta 8, de uno en uno)-4:3:17 (genera un vector desde -4 hasta 17, de tres en tres)
CONSTRUIR LA GRAFICA DE: x(t)=20cos(2pi t)
t= -pi : 0.1 : pi;x=20*cos(2*pi*t)plot (t,x) % grafica la función como continuagrid on % para activar la grilla que es una cuadricula que permite interpretar mejor la grafica
CONSTRUIR LA GRAFICA DE: x(t)=20cos(2pi t)
t= -pi : 0.1 : pi;x=20*cos(2*pi*t)stem (t,x) % grafica la función como discretagrid on % para activar la grilla que es una cuadricula que permite interpretar mejor la grafica
CONSTRUIR LA GRAFICA DE: x(t)=5-2t+t¬2 – 3t¬3
t= -10:0.1:10x=5-2*t+t.¬2 – 3*t.¬3plot (t,x) % grafica la función como continuagrid on % para activar la grilla que es una cuadricula que permite interpretar mejor la grafica
CONSTRUIR LA GRAFICA DE LAS COMPONENTES: xe(t)=5+t¬2 ; xo(t)=-2t – 3t¬3
t= -10:0.1:10x=5-2*t+t.¬2 – 3*t.¬3xe=5+t.¬2xo=-2*t – 3*t.¬3plot (t,x) % grafica la función como continuafigureplot (t,xe)figureplot (t,xo)grid on % para activar la grilla que es una cuadricula que permite interpretar mejor la grafica
NOTA: TODA GRÁFICA DEBE TENER EL NOMBRE (ETIQUETAS) DE LOS EJES, Y EL TITULO DE LA GRÁFICA.
Con la función “subplot(2,2,2)” dos filas, dos columnas, posición 2 (resultante)
originalresultanteparimpar
t= -10:0.1:10x=5-2*t+t.¬2 – 3*t.¬3xe=5+t.¬2xo=-2*t – 3*t.¬3xr=xe+xosubplot(2,2,1)plot (t,x) % grafica la función como continuasubplot(2,2,2) % resultanteplot (t,xr)subplot(2,2,3) % parplot (t,xe)subplot(2,2,4) % imparplot (t,xo)
TAREA: EMPEZAR A TRABAJAR EL PRIMER PUNTO DEL LABORATORIO.
CLASE 17/02
Recommended