norm

AnsMat.norm(nrmtype='nrm2')

Matrix or vector norm.

Parameters
nrmtypestr, optional

Mathematical norm to use. One of:

  • 'NRM2': L2 (Euclidean or SRSS) norm (default).

  • 'NRM1': L1 (absolute sum) norm (vectors only).

  • 'NRMINF' : Maximum norm.

Returns
float

Norm of the matrix or vector(s).

Examples

>>> mm = mapdl.math
>>> dim = 1000
>>> m2 = mm.rand(dim, dim)
>>> nrm = mm.norm( m2)