Sparse norm(S,2) is not available.

Hello i get the error spare norm(S,2) is not available in my code at the line where i have
Mnrm = 2.5e+5;
scal = Mnrm/norm(A); % A = 10000x10000 sparse double
% Error using norm
% Sparse norm(S,2) is not available.
What could be the issue?

1 件のコメント

Torsten
Torsten 2019 年 3 月 11 日
Does "normest" instead of "norm" work for your matrix ?

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

回答 (1 件)

Shiduo Yu
Shiduo Yu 2021 年 6 月 28 日

0 投票

The function norm doesn't support sparse matrix input. You can try full(sqrt(sum(abs(A(:)).^2))) for instead.

カテゴリ

ヘルプ センター および File ExchangeSparse Matrices についてさらに検索

質問済み:

2019 年 3 月 10 日

回答済み:

2021 年 6 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by