You are on page 1of 6

Mtodos Numricos - MATLAB

ALUMNO: RODRIGUEZ UCHUYPOMA, Luis Miguel


TEMA: Matrices, Polinomios, Funciones y Graficas
TURNO: Martes

FECHA: 20 09 2016

>> M = [3 5 6 1; 5 4 9 7; 1 4 6 8; 3 7 6 9]
M=
3

>> b= M' % MATRIZ M TRANSPUESTA Solo pon Chica gamer en PornHub y te


sale al tiro.

b=
3

>> D = M(3:4,1:3)
D=
1

>> Q = M([1,3],3:4)
Q=
6

>> E = M([1,3],[1,3])

Mtodos Numricos - MATLAB


E=
3

>> W = M(2:3,[1 3])


W=
5

>> diag(M)
ans =

3
4
6
9

>> diag(M)'
ans = 3

E=diag(diag(M))
E= 3

>> tril(M) %MATRIZ TRIANGULAR INFERIOR


ans =
3

Mtodos Numricos - MATLAB


>>triu(M)% MATRIZ TRIANGULAR SUPERIOR
ans =
3

>> sum(M)
ans =
12

20

27

25

>> prod(M)
ans =
45

560

1944

504

0.2472 -0.4382

0.2135

0.1517 -0.1798 -0.0449

0.1629

>> inv(M)
ans =
-0.1461

0.1404

0.0187

0.2547 -0.2566

-0.1629

0.0449

0.0112

>> t = trace(M)
t=
22
>> det(M)
ans =
-534

0.0843

Mtodos Numricos - MATLAB

POLINOMIOS:

>> % Sea el Polinomio


>> P= [2 0 -3 5 0 2]
P=
2

-3

>> Q= [1 6 -1 3]
Q=
1

-1

>> T = conv(P,Q) % Multiplicacion de polinomios


T=
2

12

-5

-7

33 -12

27

-2

>> R = deconv(P,Q) % Divicion de polinomios


R=
2 -12

71

>> A = polyder(P) % Derivada del polinomio


A=
10

-9

10

>> % Sea el Polinomio


>> P= [2 0 -3 5 0 2]
P=
2

-3

>> Q= [1 6 -1 3]
Q=
1

-1

Mtodos Numricos - MATLAB


>> T = conv(P,Q) % Multiplicacion de polinomios
T=
2

12

-5

-7

33 -12

27

-2

>> R = deconv(P,Q) % Divicion de polinomios


R=
2 -12

71

>> A = polyder(P) % Derivada del polinomio


A=
10

-9

10

FUNCIONES y GRAFICA
>> x= 1:8
x=
1

>> Q(x)=3*x.^3+4*x.^2-x+5
Q=
11

43

119

257

475

791

1223

-121

-116

11

356

1789

>> G(x)=x.^4-6*x.^3+2*x-1
G=
-4

-29

-76

1039

>> H(x)= 2*x.^5 - 3*x.^4 + 2*x.^3 + 4


H=

36

301

1412

4629

12100

27101

54276

Mtodos Numricos - MATLAB


>> plot(x,Q,x,G)

>> plot3(x,Q,x,G,x,H)

You might also like