Fastest way to compute spectral norm of a matrix?

35 ビュー (過去 30 日間)
Michael
Michael 2013 年 6 月 11 日
Hello
I can't find any mention of the spectral norm in the documentation. I want to calculate
max(|Ax|)/x for any vector x, given a matrix A.
There's a method via the eigenvalues of A'A but that sounds very memory intensive, I was wondering if anyone knows a faster in-built option.
Thanks
Mike

採用された回答

Matt J
Matt J 2013 年 6 月 11 日
See the NORM command. It accepts matrix inputs.
  3 件のコメント
Matt J
Matt J 2013 年 6 月 11 日
編集済み: Matt J 2013 年 6 月 11 日
Yes. Try it:
>> A=rand(5);
>> max(sqrt(eig(A.'*A)))
ans =
2.2584
>> norm(A)
ans =
2.2584
Matt J
Matt J 2013 年 6 月 11 日
編集済み: Matt J 2013 年 6 月 11 日
Hmmm. Looks like NORM is not as fast as the direct calculation,
A=rand(1000);
tic;
n1=sqrt( max( eig(A.'*A) ) );
toc; %Elapsed time is 0.150860 seconds.
tic;
n2=norm(A);
toc; %Elapsed time is 0.319899 seconds.
However, I'm pretty sure it's because NORM uses SVD instead of EIG, which is probably more numerically stable.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by