Returns the specified matrix norm.
MatrixObject.Norm(NormType)
A Double value equal to the specified matrix norm.
The following table describes the possible values for the NormType parameter.
| Description | Value | |
|---|---|---|
| bmNormOne | Calculates the one norm, the maximum column sum of absolute values. | 1 |
| bmNormFrobenius | (Default) Calculates the Frobenius norm of the matrix, the square root of the sum of the absolute squares of matrix elements. | 2 |
| bmNormEuclidean | Calculates the Euclidean norm of the matrix, the largest singular value of the matrix. | 3 |
| bmNormInfinity | Calculates the infinity norm of the matrix, the largest row sum of absolute values. | 4 |
Private Sub MatrixNorm()
Dim A As Matrix, Norm As Double
Set A = New Matrix
A.Size 4, 4
A.FillRandom
Debug.Print "A ="
Debug.Print A.GetString
Debug.Print "One Norm ="; A.Norm(bmNormOne)
Debug.Print "Frobenious ="; A.Norm(bmNormFrobenius)
Debug.Print "Euclidean ="; A.Norm(bmNormEuclidean)
Debug.Print "Infinity ="; A.Norm(bmNormInfinity)
End Sub
A = | 6.000 2.000 8.000 6.000 | | 5.000 4.000 9.000 8.000 | | 7.000 2.000 9.000 7.000 | | 5.000 3.000 0.000 1.000 | One Norm = 26 Frobenious = 23.3238075793812 Euclidean = 22.7204825366697 Infinity = 26
Applies To: Matrix