0% found this document useful (0 votes)
21 views4 pages

Asesoria AL Sem4 2024 0

The document contains examples of matrix operations in MATLAB including: 1) Finding the eigenvalues and eigenvectors of matrices using eig() and checking if they form an orthonormal set. 2) Decomposing matrices into diagonal matrices using their eigendecomposition and checking if they are diagonalizable. 3) Performing SVD on matrices using svd() and comparing the results to eigendecomposition. 4) Examples of constructing joint matrices and decomposing them.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

Asesoria AL Sem4 2024 0

The document contains examples of matrix operations in MATLAB including: 1) Finding the eigenvalues and eigenvectors of matrices using eig() and checking if they form an orthonormal set. 2) Decomposing matrices into diagonal matrices using their eigendecomposition and checking if they are diagonalizable. 3) Performing SVD on matrices using svd() and comparing the results to eigendecomposition. 4) Examples of constructing joint matrices and decomposing them.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

EJERCICIOS DE REPASO

E = [4 1 2 ; 1 5 3 ; 2 3 6]

E = 3×3
4 1 2
1 5 3
2 3 6

[P,D] = eig(E)

P = 3×3
0.4412 0.8156 0.3744
0.5774 -0.5774 0.5774
-0.6870 0.0386 0.7256
D = 3×3
2.1944 0 0
0 3.3868 0
0 0 9.4188

if P*P' == eye(3)
disp("Los vectores propios forman un conjunto ortonormal")
else
disp("Los vectores propios forman un conjunto ortonormal")
end

Los vectores propios forman un conjunto ortonormal

F = [3 1 ; 1 4]

F = 2×2
3 1
1 4

[P,D] = eig(F)

1
P = 2×2
-0.8507 0.5257
0.5257 0.8507
D = 2×2
2.3820 0
0 4.6180

if rank(P,1e-8) == 2
disp("La matriz es diagonalizable y F = PDP^-1")
else
disp("La matriz no es diagonalizable")
end

La matriz es diagonalizable y F = PDP^-1

G = [2 -1 ; -1 3]

G = 2×2
2 -1
-1 3

[P,D] = eig(G)

P = 2×2
-0.8507 -0.5257
-0.5257 0.8507
D = 2×2
1.3820 0
0 3.6180

if rank(P,1e-8) == 2
disp("Los vectores propios son l.i.")
else
disp("Los vectores propios son l.d.")
end

Los vectores propios son l.i.

Descomposición SVD
EJERCICIO 4

A = [1 2 ; 1 2]

2
A = 2×2
1 2
1 2

[U,S,V] = svd(A)

U = 2×2
-0.7071 -0.7071
-0.7071 0.7071
S = 2×2
3.1623 0
0 0.0000
V = 2×2
-0.4472 0.8944
-0.8944 -0.4472

[P,D] = eig(A)

P = 2×2
-0.8944 -0.7071
0.4472 -0.7071
D = 2×2
0 0
0 3

B1 = A*A'

B1 = 2×2
5 5
5 5

B2 = A'*A

B2 = 2×2
2 4
4 8

svd(A)

ans = 2×1
3.1623
0.0000

svd(A')

ans = 2×1
3.1623
0.0000

V1 = 2×2
2 0
2 2

3
V2 = 2×2
4 0
6 6
Joint1 = 2×4
2 2 4 6
0 2 0 6
L = 2×4
1 0 2 0
0 1 0 3
T = 2×2
2 0
0 3
P = 2×4
0 2 2 0
0 0 2 2
Q = 2×4
0 4 4 0
0 0 6 6
V2 = 2×2
4 0
6 6
V3 = 2×2
-1 -4
7 4
Joint2 = 2×4
4 6 -1 7
0 6 -4 4
L = 2×4
1.0000 0 0.7500 0.7500
0 1.0000 -0.6667 0.6667
S = 2×2
0.7500 -0.6667
0.7500 0.6667
R = 2×4
0 3 -1 -4
0 3 7 4
M = 2×2
1.5000 -2.0000
1.5000 2.0000
ans = 2x4 logical array
1 1 1 1
1 1 1 1

You might also like