Use the diag command to find matrix and find dominant eigenvalues
Mostrar comentarios más antiguos
Consider the following vectors, which you can copy and paste directly into Matlab.
x = [2 1 2 6 6 5 5 5 5 5 4 6];
y = [6 5 6 2 5 2 1 2 2 6 5];
Use the vectors x and y to create the following matrix.
2 6 0 0 0 0 0 0 0 0 0 0
6 1 5 0 0 0 0 0 0 0 0 0
0 5 2 6 0 0 0 0 0 0 0 0
0 0 6 6 2 0 0 0 0 0 0 0
0 0 0 2 6 5 0 0 0 0 0 0
0 0 0 0 5 5 2 0 0 0 0 0
0 0 0 0 0 2 5 1 0 0 0 0
0 0 0 0 0 0 1 5 2 0 0 0
0 0 0 0 0 0 0 2 5 2 0 0
0 0 0 0 0 0 0 0 2 5 6 0
0 0 0 0 0 0 0 0 0 6 4 5
0 0 0 0 0 0 0 0 0 0 5 6
Such a matrix is called a tri-diagonal matrix. Hint: Use the diag command three times, and then add the resulting matrices.
To check that you have correctly created the matrix A, verify that det(A) = -4.2749e+07.
Find the dominant eigenvalue of A.
Respuesta aceptada
Más respuestas (1)
Meng Wang
el 7 de Nov. de 2020
0 votos
Consider the following vector x, which you can copy and paste directly into Matlab.
x = [2 5 3 3 2 2 6 3 3 3 5 4 5 2 4 4 3 3 2 3 1 6 2 4 3]'
Use the reshape command to reshape the vector x into a square matrix, and then find the determinant of the resulting matrix.
Categorías
Más información sobre Linear Algebra en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!