matrix norm
[y]=norm(x [,flag])
:x real or complex vector or matrix (full or sparse storage) : :flag string (type of norm) (default value =2) : :y norm :
For matrices
: :norm(x,’fro’) Frobenius norm i.e. sqrt(sum(diag(x’*x))). :
For vectors
:norm(v,p) The l_p norm ( sum(v(i)^p))^(1/p) . : :norm(v), norm(v,2) The l_2 norm : :norm(v,’inf’) max(abs(v(i))). :
A=[1,2,3];
norm(A,1)
norm(A,'inf')
A=[1,2;3,4]
`max`_(`svd`_(A))-norm(A)
A=`sparse`_([1 0 0 33 -1])
norm(A)