Sparse norm(S,2) is not available.

조회 수: 25 (최근 30일)
fadams18
fadams18 2019년 3월 10일
답변: Shiduo Yu 2021년 6월 28일
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일
The function norm doesn't support sparse matrix input. You can try full(sqrt(sum(abs(A(:)).^2))) for instead.

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by