Page 1 sur 1

norm returns the approximate norm of a matrix

Publié : jeu. août 23, 2018 2:01 am
par belanger
The norm command gives the exact value for vectors

Input: norm([1,2,3,-4])

Output: sqrt(30)

For a matrix, though, it returns an approximation.

Input: norm([[1,2],[3,-4]])

Output: 5.11667273602

I get the same result for l2norm in both cases.

The manual (section l2 matrix norm) indicates that it should be exact.

Re: norm returns the approximate norm of a matrix

Publié : jeu. août 23, 2018 7:23 am
par parisse
norm or l2norm on a matrix returns the norm induced by the L2 norm on the vector space where the matrix acts, like matrix_norm(.,2). That must be numeric.
Run frobenius_norm to get sqrt(30).
The French doc seems accurate, while the English doc should probably be completed.