Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

1

HOJA DE TRABAJO MÉTODOS NUMÉRICOS

ESTUDIANTE: CARNÉ:
1. ______________________________________________________________________

Instrucciones: Resolver lo que se le indica en MATLAB.

Serie I.
2 3 4 2 4 2 2 1 6 1
Si

8 0 0 5 0 5 0 1 0 2

Encontrar:

1.) 3
2.) 2
3.)
4.)
5.)
6.) ∗
7.) /
8.) /2
9.) 5 ∗2
10.) ∗ 2

Serie II.
Resolver los siguientes sistemas utilizando los tres procedimientos en clase. Comprobar que que
sale la misma solución.

2 11
3 2 9
4 2 4

2 0
1
2 3 5

ING. MANUEL SALVADOR BOLAÑOS


16/02/22 07:02 PM MATLAB Command Window 1 of 5

>> %UNIVERSIDAD MARIANO GALVEZ DE GUATEMALA


>> %ALBERTO ALDAIR GUZMAN TESUCUN
>> %1690-20-5448
>> %SERIE 1
>> A=[-2 3;8 0]

A =

-2 3
8 0

>> B=[4 -2;0 -5]

B =

4 -2
0 -5

>> C=[4 -2;0 -5]

C =

4 -2
0 -5

>> D=[2 -1;0 1]

D =

2 -1
0 1

>> E=[6 1;0 2]

E =

6 1
0 2

>> %ENCONTRAR
>> %1
>> 3*A-B

ans =

-10 11
24 5

>> %2 B-2A
>> 3*A-B

ans =
16/02/22 07:02 PM MATLAB Command Window 2 of 5

-10 11
24 5

>> %3A-D
>> A-D

ans =

-4 4
8 -1

>> %4.D-A
>> D-A

ans =

4 -4
-8 1

>> %5. C+A


>> C+A

ans =

2 1
8 -5

>> % 6.E*D
>> E.*D

ans =

12 -1
0 2

>> %7. C/B


>> C./B

ans =

1 1
NaN 1

>> %8. E/2-A


>> E/2-A

ans =

5.0000 -2.5000
-8.0000 1.0000

>> %9 5E*2A
>> a=5*E
16/02/22 07:02 PM MATLAB Command Window 3 of 5

a =

30 5
0 10

>> %10 B^2*-2C


>> c=B.2
c=B.2

Error: Invalid expression. Check for missing multiplication operator, missing or


unbalanced delimiters,
or other syntax error. To construct matrices, use brackets instead of parentheses.

>> c=B.^2

c =

16 4
0 25

>> %SERIE 2
>> %Resolver los siguientes sistemas utilizando los tres procedimientos en clase.
Comprobar que que
sale la misma solución.
Unrecognized function or variable 'sale'.

Did you mean:


>> % PROBLEMA 1
>> AA=[2 -1 1;-1 -3 2;-4 -2 1]

AA =

2 -1 1
-1 -3 2
-4 -2 1

>> %PROBLEMA 1 SOLUCION 2


>> BB=[11;9;-4]

BB =

11
9
-4

>> det(AA)

ans =

-1.0000

>> CC=[AA BB]


16/02/22 07:02 PM MATLAB Command Window 4 of 5

CC =

2 -1 1 11
-1 -3 2 9
-4 -2 1 -4

>> rref(CC)

ans =

1 0 0 2
0 1 0 3
0 0 1 10

>> x=inv(AA)*BB

x =

2.0000
3.0000
10.0000

>> y=AA\BB

y =

2.0000
3.0000
10.0000

>> %PROBLEMA 2 METODO 1


>> DD=[2 1 1;-1 -1 1;1 -2 3]

DD =

2 1 1
-1 -1 1
1 -2 3

>> EE=[0;1;5]

EE =

0
1
5

>> det(DD)

ans =

5
16/02/22 07:02 PM MATLAB Command Window 5 of 5

>> FF=[DD EE]

FF =

2 1 1 0
-1 -1 1 1
1 -2 3 5

>> rref(FF)

ans =

1 0 0 1
0 1 0 -2
0 0 1 0

>> r=inv(DD)*EE

r =

1.0000
-2.0000
0

>> s=DD\EE

s =

1.0000
-2.0000
-0.0000

>> %FECHA DE ENTREGA 16/02/2022


>>

You might also like