; $Id: norm.pro,v 1.1 1993/04/02 19:43:31 idl Exp $ FUNCTION NORM, A ;+ ;NAME: ; NORM ; ;PURPOSE: ; Computes the 'infinity norm' of the ; input MxN MATRIX: A. ; ;CATEGORY: ; Numerical Analysis ; ;CALLING SEQUENCE: ; inf_norm=NORM(A) ; ;INPUTS: ; A: A matrix of dimension MxN. ; ; ;OPTIONAL INPUT PARAMETERS: ; None ; ;OUTPUTS: ; Returns the 'infinity norm' (scalar_valued) ; corresponding to the MxN MATRIX: A ; ;SIDE EFFECTS: ; None ; ;RESTRICTIONS: ; The elements of matrix A must be of type: ; float, double, or int. ; ;PROCEDURE: ; This function returns the 'infinity norm' or ; maximum row sum norm of a matrix. ; ;MODIFICATION HISTORY: ; GGS, April, 1992 ;- ; ; create the matrix of absolute values. A_abs=abs(A) ; add the elements of each row. row_sum=total(A_abs,1) ; find the maximum row sum. INF_NORM=max(row_sum) return,INF_NORM end