• Support PF! Buy your school textbooks, materials and every day products Here!

MATLAB, eigenvalues and condition number of a symmetric square matrix

  • Thread starter osqen
  • Start date
6
0
2. Write a MATLAB® function to calculate the condition number of a symmetric square matrix of any size by means of Eigenvalues:

§ The power method should be used to calculate the Eigenvalues.

§ The script (function) should give an error message if the matrix is not square and/or is not symmetric.

§ The result of the built-in MATLAB® function “cond” should be displayed in addition to the results of the power method.

For example:



function [condPower,condMatlab]=NameofFunction(A,…)





condPower=…;

condMatlab=cond(A);

fprintf(‘Condition of matrix calculated using the Power method is %5.2g and using cond(A) is %5.2g \n’, condPower,condMatlab);
 

Answers and Replies

212
0
2. Write a MATLAB® function to calculate the condition number of a symmetric square matrix of any size by means of Eigenvalues:

§ The power method should be used to calculate the Eigenvalues.

§ The script (function) should give an error message if the matrix is not square and/or is not symmetric.

§ The result of the built-in MATLAB® function “cond” should be displayed in addition to the results of the power method.

For example:



function [condPower,condMatlab]=NameofFunction(A,…)





condPower=…;

condMatlab=cond(A);

fprintf(‘Condition of matrix calculated using the Power method is %5.2g and using cond(A) is %5.2g \n’, condPower,condMatlab);
First, how do you find the condition number of a matrix if you know the eigenvalues?

Second, how do you compute the eigenvalues using the power method?

Which of these are you having trouble with?
 

Related Threads for: MATLAB, eigenvalues and condition number of a symmetric square matrix

Replies
11
Views
8K
Replies
4
Views
2K
Replies
2
Views
456
  • Last Post
Replies
2
Views
2K
Replies
1
Views
471
Replies
9
Views
6K
Replies
18
Views
590
Top