The NORM function computes the Euclidean norm of a vector. Alternatively, NORM computes the Infinity norm of an array.
This routine is written in the IDL language. Its source code can be found in the file
norm.pro
in the
lib
subdirectory of the IDL distribution.
Define an n -element complex vector A:
A = [COMPLEX(1, 0), COMPLEX(2,-2), COMPLEX(-3,1)]
PRINT, NORM(A) ; Compute the Euclidean norm of A and print.
Define an m by n complex array A:
B = [[COMPLEX(1, 0), COMPLEX(2,-2), COMPLEX(-3,1)], $
[COMPLEX(1,-2), COMPLEX(2, 2), COMPLEX(1, 0)]]
PRINT, NORM(B, /DOUBLE) ; Compute the Infinity norm of B and print.