Question

In: Advanced Math

Given the following 40x40 matrix below, with starting vector V shown below also, apply the power...

Given the following 40x40 matrix below, with starting vector V shown below also, apply the power method to find the dominant eigenvalue of matrix using MATLAB program, MAPLE program or some other computer program to print out: the estimate of the lambda with tolerance 0.01, the number of iterations, and the converged lambda. Then print out the transpose of the eigenvector (should be 40 components) produced with up to two decimals.

Starting Vector V= [

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

];

Matrix A =

[

4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

-1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 0 0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 0 0 0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 0 0 0 0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 0 0 0 0 0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;

0 0 0 0 0 0 0 -1 4 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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normalizing
L = sum(A*v .* v) / sum(v .* v);
if abs(L - L_h) < tol
break
end
end
L = sum(A*v .* v) / sum(v .* v); % Dominant Eigenvalue
fprintf('Number of Iterations = %d\n', iter)
fprintf('Dominant Eigenvalue = %.2f\n', L)
disp('Dominant Eigenvector (Transposed) = '), disp(v')

Output:


Related Solutions

1. Given the incidence matrix shown below: a. Apply the ranking order clustering algorithm in order...
1. Given the incidence matrix shown below: a. Apply the ranking order clustering algorithm in order to establish the appropriate part families and machine cells (20 points). 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 1 1 0 b. Based on your clustering outcome above, how many cells will you use and what machines/processes and...
How do i change the vector v to size 20 in C++. Also given the following,...
How do i change the vector v to size 20 in C++. Also given the following, which line of code stores 40 into the 4th column of the 6th row of array dataVals? const int rows = 7; const int cols = 5; int dataVals[rows][cols]; Select one: a. dataVals[5, 3] = 40; b. dataVals[5 * 3] = 40; c. dataVals[3][5] = 40; d. dataVals[5][3] = 40;
For the following exercises, write the vector shown in component form. Given initial point P1 = (2, 1) and terminal point P2 = (−1, 2), write the vector v in terms of ...
For the following exercises, write the vector shown in component form.Given initial point P1 = (2, 1) and terminal point P2 = (−1, 2), write the vector v in terms of i and j, then draw the vector on the graph.
Find the equilibrium vector for the transition matrix below. left bracket Start 3 By 3 Matrix...
Find the equilibrium vector for the transition matrix below. left bracket Start 3 By 3 Matrix 1st Row 1st Column 0.3 2nd Column 0.3 3rd Column 0.4 2nd Row 1st Column 0.2 2nd Column 0.4 3rd Column 0.4 3rd Row 1st Column 0.3 2nd Column 0.2 3rd Column 0.5 EndMatrix right bracket, The equilibrium vector is?
1. Vector u =< 0,−1,3 > is given. Find a non zero vector v which is...
1. Vector u =< 0,−1,3 > is given. Find a non zero vector v which is perpendicular to u. Then find a vector w which is perpendicular to both u and v. Explain the reason for your selection clearly. 2. Find the slope of the tangent line to the parametric curve x = 5 + sin(3θ) and y = −3 + 2tanθ at θ = π.
Find the equilibrium vector for the transition matrix below. 0.4......0.6 0.3......0.7 The equilibrium vector is.... Find...
Find the equilibrium vector for the transition matrix below. 0.4......0.6 0.3......0.7 The equilibrium vector is.... Find the equilibrium vector for the transition matrix below. 0.2...0.2...0.6 0.2...0.4...0.4 0.2...0.3...0.5 The equilibrium vector is... Find the equilibrium vector for the transition matrix below. 0.2...0.2...0.6 0.8...0.1...0.1 0.2...0.4...0.4 The equilibrium vector is ...
For the following exercises, write the vector shown in component form. Given initial point P1 = (4, −1) and terminal point P2 = (−3, 2), write the vector v in terms of i and j. Draw the ..
For the following exercises, write the vector shown in component form.Given initial point P1 = (4, −1) and terminal point P2 = (−3, 2), write the vector v in terms of i and j. Draw the points and the vector on the graph.
For the following exercises, write the vector shown in component form. Given initial point P1 = (4, −1) and terminal point P2 = (−3, 2), write the vector v in terms of i and j. Draw the ..
For the following exercises, write the vector shown in component form.Given initial point P1 = (4, −1) and terminal point P2 = (−3, 2), write the vector v in terms of i and j. Draw the points and the vector on the graph.
Given the matrix as shown below n_array = 3 1 8 3 5 7 4 9...
Given the matrix as shown below n_array = 3 1 8 3 5 7 4 9 2 Write a M-file script program that generates this n_array, and answer each question using one line of MATLAB statement. a) Replace the second column of the n_array with a column of 0s b) Replace the element in the second-row, third-column with a zero c) Change the n_array to a 4 x 3 array by adding a row of 0s The end result for...
For the following exercises, calculate u ⋅ v. Given the vectors shown in Figure 4, sketch u + v, u − v and 3v.
For the following exercises, calculate u ⋅ v.Given the vectors shown in Figure 4, sketch u + v, u − v and 3v.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT