function WNNORM, A ;+ ;NAME: ; WNNORM ; ;PURPOSE: ; To compute the Euclidean norm of an column-dominant ; or a row-dominant array. ; ;CATEGORY: ; Simple math. ; ;CALLING SEQUENCE: ; Result = WNNORM(A) ; ;INPUTS: ; A: A vector ; ;OUTPUTS: ; The Euclidean norm of the vector. ; ;NOTES: ; To get the same result as IDL's intrinsic NORM ; function, one can run REFORM on the column-dominant array. ; This function eliminates that step. ; ;EXAMPLE: ; IDL>a = [[1,2,3],[4,5,6],[7,8,9]] ; IDL>print, a ; 1 2 3 ; 4 5 6 ; 7 8 9 ; IDL>b = a(0,*) ; IDL>print, b ; 1 ; 4 ; 7 ; IDL>print, WNNORM(b) ; 8.12404 ; ;MODIFICATION HISTORY: ; Amara Graps, January 1995. ; copyright (c) Amara Graps 1995, 1996. ;- snorm = SQRT(TOTAL(A*A)) RETURN, snorm END ;************************************************