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.
Best Answer