Date post: | 17-May-2015 |
Category: |
Technology |
Upload: | cbpresentaciones |
View: | 319 times |
Download: | 0 times |
Mathematica by ExampleFourth EditionMartha L.Abell and James P.Braselton
Definiendo matrices
m = 88casa, gato<, 8a21, a22<<
2 Laboratorio1 EDO .nb
Matrices
Trabajando con subíndices
Clear@a, b, matrixa, matrixbDmatrixa = Table@ai,j, 8i, 1, 3<, 8j, 1, 5<D
88a1,1, a1,2, a1,3, a1,4, a1,5<, 8a2,1, a2,2, a2,3, a2,4, a2,5<, 8a3,1, a3,2, a3,3, a3,4, a3,5<<
MatrixForm@matrixaDa1,1 a1,2 a1,3 a1,4 a1,5
a2,1 a2,2 a2,3 a2,4 a2,5
a3,1 a3,2 a3,3 a3,4 a3,5
matrixa = Array@a, 83, 3<D88a@1, 1D, a@1, 2D, a@1, 3D<, 8a@2, 1D, a@2, 2D, a@2, 3D<, 8a@3, 1D, a@3, 2D, a@3, 3D<<
MatrixForm@matrixaD
¢ | £
Laboratorio1 EDO .nb 3
Matrices Rectangulares
Definiendo matrices rectangulares
matrixb = Array@b, 82, 4<D
MatrixForm@matrixbD
Clear@c, matrixcDc@i_, j_D = NAHi + jLiE
Hi + jLi
matrixc = Array@c, 83, 4<D882, 3, 4, 5<, 89, 16, 25, 36<, 864, 125, 216, 343<<
matrixc �� MatrixForm
2 3 4 5
9 16 25 36
64 125 216 343
¢ | £
4 Laboratorio1 EDO .nb
Matrices por fórmula
N@MatrixForm@matrixcDD
MatrixForm@IdentityMatrix@4DD1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Laboratorio1 EDO .nb 5
Definiendo Vectores
w = 8-4, -5, 2<;%% Este es un comentario
w1 = 88-4<, 8-5<, 82<<;MatrixForm@wD;vectorv = Array@v, 4D;zerovec = Table@0, 85<D;
80, 0, 0, 0, 0<
¢ | £
6 Laboratorio1 EDO .nb
Extraer elementos de matrices
mb = 8810, - 6, -9<, 86, -5, -7<, 8-10, 9, 12<<;MatrixForm@mbDmb@@3DDmb@@1, 3DDmatrixa = 880, -2, 2<, 8-1, 1, -3<, 82, -4, 1<<;MatrixForm@matrixaD
¢ | £
Laboratorio1 EDO .nb 7
La transpuesta de una matriz
ta = Transpose@matrixaD;MatrixForm@taD
a@1, 1D a@2, 1D a@3, 1Da@1, 2D a@2, 2D a@3, 2Da@1, 3D a@2, 3D a@3, 3D
Transpose@matrixaD@@2DD8a@1, 2D, a@2, 2D, a@3, 2D<
ta@@3DD8a@1, 3D, a@2, 3D, a@3, 3D<
Take@matrixa, 2DTake@matrixa, 2D �� MatrixForm
88a@1, 1D, a@1, 2D, a@1, 3D<, 8a@2, 1D, a@2, 2D, a@2, 3D<<
a@1, 1D a@1, 2D a@1, 3Da@2, 1D a@2, 2D a@2, 3D
Take@matrixa, 82<DTake@matrixa, 82<D �� MatrixForm
88a@2, 1D, a@2, 2D, a@2, 3D<<
H a@2, 1D a@2, 2D a@2, 3D L
Take@matrixa, 82, 3<DTake@matrixa, 82, 3<D �� MatrixForm
¢ | £
8 Laboratorio1 EDO .nb
Inversa de una matriz
Inverse@88a, b<, 8c, d<<D �� MatrixForm
d
-b c+a d-
b
-b c+a d
-
c
-b c+a d
a
-b c+a d
ma = 883, -4, 5<, 88, 0, -3<, 85, 2, 1<<mb = 8810, -6, -9<, 86, -5, -7<, 8-10, 9, 12<<
883, -4, 5<, 88, 0, -3<, 85, 2, 1<<
8810, -6, -9<, 86, -5, -7<, 8-10, 9, 12<<
md = ma + mb �� MatrixForm
mb | 4 ma �� MatrixForm
13 -10 -4
14 -5 -10
-5 11 13
120 | 96 | -180 |
192 | 0 84 |
-200 | 72 | 48 |
md
13 -10 -4
14 -5 -10
-5 11 13
mb
¢ | £
Laboratorio1 EDO .nb 9
Inversa
Inverse@maD �� MatrixForm
¢ | £
10 Laboratorio1 EDO .nb
La división entre matrices no existe (.)
ma.Inverse@maD �� MatrixForm
1 0 0
0 1 0
0 0 1
Laboratorio1 EDO .nb 11
Transpuesta y Determinante
Transpose@Hma - 2 mbL.mbD �� MatrixForm
-352 -90 384
269 73 -277
373 98 -389
Det@maD
190
12 Laboratorio1 EDO .nb
El cuadrado de una matriz
matrixb = 88-2, 3, 4, 0<, 8-2, 0, 1, 3<, 8-1, 4, -6, 5<, 84, 8, 11, -4<<;[email protected]
-6 10 -29 29
15 22 19 -7
20 13 91 -38
-51 24 -86 95
Laboratorio1 EDO .nb 13
La potencia de una matriz
MatrixForm@MatrixPower@matrixb, 3DD
137 98 479 -231
-121 65 -109 189
-309 120 -871 646
520 263 1381 -738
14 Laboratorio1 EDO .nb
Potencias (^)
MatrixFormAmatrixb3E
-8 27 64 0
-8 0 1 27
-1 64 -216 125
64 512 1331 -64
matrixb
88-2, 3, 4, 0<, 8-2, 0, 1, 3<, 8-1, 4, -6, 5<, 84, 8, 11, -4<<
Laboratorio1 EDO .nb 15
Operaciones Básicas con Vectores
v = 80, 5, 1, 2<;w = 83, 0, 4, 2<;
v.w
v - 2 w
8
8-6, 5, -7, -2<
16 Laboratorio1 EDO .nb
Norma
Norm@vD
30
uv =v
Norm@vD
:0,5
6,
1
30
,2
15>
Norm@uvD
1
Laboratorio1 EDO .nb 17
Producto Punto
u = 83, 4, 1<;v = 8-4, 3, -2<;udv = Dot@u, vD
-2
18 Laboratorio1 EDO .nb
Ángulo entre dos vectores
ucv = Cross@u, vDnu = Norm@uDnv = [email protected]@u.v� Hnu nvLDN@%D
Clear@"Global`*"D
Laboratorio1 EDO .nb 19
Resolviendo Sistemas de ecuaciones lineales
¢ | £
matrixa = 883, 0, 2<, 8-3, 2, 2<, 82, -3, 3<<;b = 83, -1, 4<;8x, y, z< = [email protected]
20 Laboratorio1 EDO .nb
ParametricPlot@88t, H2 t + 3L �4<, 8t, 6 - 2 t<<, 8t, -1, 5<D
-1 1 2 3 4 5
-4
-2
2
4
6
8
Laboratorio1 EDO .nb 21
New Slide
Solve@82 x - 4 y � -3, 2 x + y � 6<, 8x, y<D
Se tienen tres lingotes compuestos del siguiente modo :
·El primero de 20 g de oro, 30 g de plata y 40 g de cobre.
·El segundo de 30 g de oro, 40 g de plata y 50 g de cobre.
·El tercero de 40 g de oro, 50 g de plata y 90 g de cobre.
Qué peso habrá de tomarse de cada uno de los lingotes anteriores para
formar un nuevo lingote de 34 g de oro, 46 g de plata y 67 g de cobre
¢ | £
22 Laboratorio1 EDO .nb