2. Write a MATLAB® function to calculate the condition number of a symmetric square matrix of any size by means of Eigenvalues:(adsbygoogle = window.adsbygoogle || []).push({});

§ 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);

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: MATLAB, eigenvalues and condition number of a symmetric square matrix

**Physics Forums | Science Articles, Homework Help, Discussion**