www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FrobeniusNormofSparseMatrixExample.m

    %% Frobenius Norm of Sparse Matrix  

%% 
% Use |'fro'| to calculate the Frobenius norm of a sparse matrix, which
% calculates the 2-norm of the column vector, |S(:)|. 
S = sparse(1:25,1:25,1);
n = norm(S,'fro')