Matrix (version 0.99-3)

norm: Norm of a Matrix

Description

Computes a matrix norm of x using Lapack. The norm can be the one norm, the infinity norm, the Frobenius norm, or the maximum modulus among elements of a matrix, as determined by the value of type.

Usage

norm(x, type, ...)

Arguments

x
a real or complex matrix.
type
A character indicating the type of norm desired. "O" or "o" or "1" specifies the one norm, (maximum absolute column sum); "I" or "i" specifies the infinity norm (maximum abso
...
further arguments passed to or from other methods.

Value

  • A numeric value of class "norm", representing the quantity chosen according to type.

Details

Based on the Lapack functions dlange, dlansy, dlantr, zlange, zlansy, and zlantr.

References

Anderson, E., et al. (1994). LAPACK User's Guide, 2nd edition, SIAM, Philadelphia.

Examples

Run this code
x <- Hilbert(9)
norm(x, "1")
norm(x, "I")
norm(x, "F")
norm(x, "M")

Run the code above in your browser using DataCamp Workspace