ProductName  

Normalizes the current matrix.

Syntax

MatrixObject.NormalizeMe NormValue

Parameters

NormValue
Optional. Variable of type Double that, on exit, will return the norm value that was used to normalize the matrix. (Matrix element with maximum absolute value).

Remarks

The NormalizeMe method normalizes current matrix without creating a new matrix object. If you want to create a new normalized matrix out of current matrix, use the Normalize Method.

Example

This example demonstrates the use of the NormalizeMe method.
Private Sub MatrixNormalizeMe()

Dim A As Matrix, Norm As Double
    Set A = New Matrix
    A.Size 5, 5
    A.FillRandom
    Debug.Print "A ="
    Debug.Print A.GetString(0)

    Debug.Print "Normalized"
    Debug.Print A.NormalizeMe Norm
    Debug.Print A.GetString(2)
    Debug.Print "Norm used = "; Norm
    
End Sub

Output

A =
|  6  2  8  6  5 |
|  4  9  8  7  2 |
|  9  7  5  3  0 |
|  1  4  1  2 10 |
|  4  1  0  0  4 |

Normalized
| 0.60 0.20 0.80 0.60 0.50 |
| 0.40 0.90 0.80 0.70 0.20 |
| 0.90 0.70 0.50 0.30 0.00 |
| 0.10 0.40 0.10 0.20 1.00 |
| 0.40 0.10 0.00 0.00 0.40 |

Norm used =  10 

See Also

Normalize Method

Applies To: Matrix | CMatrix