norm_matrix (Operator)

Name

`norm_matrix` — Norm of a matrix.

Signature

`norm_matrix( : : MatrixID, NormType : Value)`

Description

The operator `norm_matrix` computes the norm of the elements of the `Matrix` defined by the matrix handle `MatrixID`. The return value is a floating point number.

The type of norming of the matrix can be selected via the parameter `NormType`:

'frobenius-norm':

The Frobenius norm is computed. The formula for the calculation of the result is: with m = number of rows and n = number of columns of the `Matrix`.

Example:

'infinity-norm':

The infinity norm is computed. The result is the largest value of the sum of the absolute values of the elements of the rows. The formula for the calculation is: with m = number of rows and n = number of columns of the `Matrix`.

Example:

'1-norm':

The 1-norm is computed. The result is the largest value of the sum of the absolute values of the elements of the columns. The formula for the calculation is: with m = number of rows and n = number of columns of the `Matrix`.

Example:

'2-norm':

The 2-norm is computed. The result is the largest singular value of the `Matrix`. The formula for the calculation of the result is: Value = max (singular values (Matrix))

Example:

Execution Information

• Multithreading type: reentrant (runs in parallel with non-exclusive operators).
• Processed without parallelization.

Parameters

`MatrixID` (input_control)  matrix `→` (handle)

Matrix handle of the input matrix.

`NormType` (input_control)  string `→` (string)

Type of norm.

Default value: '2-norm'

List of values: '1-norm', '2-norm', 'frobenius-norm', 'infinity-norm'

`Value` (output_control)  real `→` (real)

Norm of the input matrix.

Result

If the parameters are valid, the operator `norm_matrix` returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

`create_matrix`

`sum_matrix`, `mean_matrix`