%% 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')

% Copyright 2012 The MathWorks, Inc.