Repaso de algebra lineal

Solo disponible en BuenasTareas
  • Páginas : 19 (4554 palabras )
  • Descarga(s) : 0
  • Publicado : 14 de febrero de 2011
Leer documento completo
Vista previa del texto
REPASO DE ALGEBRA LINEAL COMPUTACIONAL

PARTE 1

Utilizando el software Matlab se repasaran algunos conceptos básicos de Algebra Lineal.

1) Crear Matrices A=(3x3), B= (5,2), C(6,10), a(10,1), b(1,10) usando el comando randn.

A=randn(3,3)
A =
0.5377 0.8622 -0.4336
1.8339 0.3188 0.3426
-2.2588 -1.3077 3.5784

>> B=randn(5,2)
B =
2.7694 0.7147-1.3499 -0.2050
3.0349 -0.1241
0.7254 1.4897
-0.0631 1.4090

>> C=randn(6,10)
C =
1.4172 1.0347 -1.1471 -0.7549 0.3129 1.1093 1.5326 0.0326 -0.7423 0.8886
0.6715 0.7269 -1.0689 1.3703 -0.8649 -0.8637 -0.7697 0.5525 -1.0616 -0.7648
-1.2075 -0.3034 -0.8095 -1.7115 -0.0301 0.0774 0.3714 1.10062.3505 -1.4023
0.7172 0.2939 -2.9443 -0.1022 -0.1649 -1.2141 -0.2256 1.5442 -0.6156 -1.4224
1.6302 -0.7873 1.4384 -0.2414 0.6277 -1.1135 1.1174 0.0859 0.7481 0.4882
0.4889 0.8884 0.3252 0.3192 1.0933 -0.0068 -1.0891 -1.4916 -0.1924 -0.1774

>> a=randn(10,1)
a =
-0.1961
1.4193
0.2916
0.19781.5877
-0.8045
0.6966
0.8351
-0.2437
0.2157

>> b=randn(1,10)
b =
-1.1658 -1.1480 0.1049 0.7223 2.5855 -0.6669 0.1873 -0.0825 -1.9330 -0.4390

2) Con el comando whos chequear que las matrices creadas están en el área de trabajo (workspace) y que tiene las dimensiones correctas

>> whos
Name Size Bytes ClassAttributes
A 3x3 72 double
B 5x2 80 double
C 6x10 480 double
a 10x1 80 double
b 1x10 80 double

3) Formar la matriz D agregando el vector a por arriba y vector b por debajo a la matriz C. Formar la matriz H con las tres primeras columnas y filas de C.>>D=[a';C;b]
D =
-0.1961 1.4193 0.2916 0.1978 1.5877 -0.8045 0.6966 0.8351 -0.2437 0.2157
1.4172 1.0347 -1.1471 -0.7549 0.3129 1.1093 1.5326 0.0326 -0.7423 0.8886
0.6715 0.7269 -1.0689 1.3703 -0.8649 -0.8637 -0.7697 0.5525 -1.0616 -0.7648
-1.2075 -0.3034 -0.8095 -1.7115 -0.0301 0.0774 0.37141.1006 2.3505 -1.4023
0.7172 0.2939 -2.9443 -0.1022 -0.1649 -1.2141 -0.2256 1.5442 -0.6156 -1.4224
1.6302 -0.7873 1.4384 -0.2414 0.6277 -1.1135 1.1174 0.0859 0.7481 0.4882
0.4889 0.8884 0.3252 0.3192 1.0933 -0.0068 -1.0891 -1.4916 -0.1924 -0.1774
-1.1658 -1.1480 0.1049 0.7223 2.5855 -0.66690.1873 -0.0825 -1.9330 -0.4390

>> H=C(1:3,1:3)
H =
1.4172 1.0347 -1.1471
0.6715 0.7269 -1.0689
-1.2075 -0.3034 -0.8095

4) Obtener las matrices traspuestas de cada una de las matrices utilizando el comando ‘

>> A'
ans =
0.5377 1.8339 -2.2588
0.8622 0.3188 -1.3077
-0.4336 0.3426 3.5784

>> B'
ans =
2.7694 -1.34993.0349 0.7254 -0.0631
0.7147 -0.2050 -0.1241 1.4897 1.4090

>> C'
ans =
1.4172 0.6715 -1.2075 0.7172 1.6302 0.4889
1.0347 0.7269 -0.3034 0.2939 -0.7873 0.8884
-1.1471 -1.0689 -0.8095 -2.9443 1.4384 0.3252
-0.7549 1.3703 -1.7115 -0.1022 -0.2414 0.3192
0.3129 -0.8649 -0.0301 -0.1649 0.62771.0933
1.1093 -0.8637 0.0774 -1.2141 -1.1135 -0.0068
1.5326 -0.7697 0.3714 -0.2256 1.1174 -1.0891
0.0326 0.5525 1.1006 1.5442 0.0859 -1.4916
-0.7423 -1.0616 2.3505 -0.6156 0.7481 -0.1924
0.8886 -0.7648 -1.4023 -1.4224 0.4882 -0.1774

>> a'
ans =
-0.1961 1.4193 0.2916 0.1978 1.5877 -0.8045...
tracking img