%% 2-Norm of Matrix Columns
% Calculate the 2-norm of the columns of a matrix.

A = [2 0 1;-1 1 0;-3 3 0]

%

n = vecnorm(A)

% As an alternative, you can use the norm function to calculate the 2-norm of the entire matrix.
% Copyright 2012 The MathWorks, Inc.