I don't understand it quite well, because my results won't fit what's expected.

Im supossed to find the 2-condition of a Wilson matrix, which apparently is equal to

Code: Select all

`|||a||| * |||a^-1|||`

where |||a||| is the 2-norm of the matrix a.

Now, according to my notes the 2-norm of a matrix a is equal to the square root of its largest eigenvalue (in absolute terms). so, my code goes something like this:

Code: Select all

`norm = sqrt(max(eig(A)))`

invnorm= sqrt(max(abs(eig(inv(A)))))

result = norm*invnorm

however, when I use the matlab command cond to check the solution, the result is totally different ( my code gives a number around 50 and matlab gives me a number around 3000).

What am I doing wrong? Are my definitions of norm and condition number correct?