Sparse norm(S,2) is not available.
20 次查看(过去 30 天)
显示 更早的评论
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 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!