Sparse norm(S,2) is not available.

15 visualizaciones (últimos 30 días)
fadams18
fadams18 el 10 de Mzo. de 2019
Respondida: Shiduo Yu el 28 de Jun. de 2021
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 comentario
Torsten
Torsten el 11 de Mzo. de 2019
Does "normest" instead of "norm" work for your matrix ?

Iniciar sesión para comentar.

Respuestas (1)

Shiduo Yu
Shiduo Yu el 28 de Jun. de 2021
The function norm doesn't support sparse matrix input. You can try full(sqrt(sum(abs(A(:)).^2))) for instead.

Categorías

Más información sobre Sparse Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by