NCDF_EXISTS $RSI/ncdf_exists.pro
[Previous] [Next]
 NAME:
	NCDF_EXISTS

 PURPOSE:
	Test for the existence of the NetCDF library

 CATEGORY:
	File Formats

 CALLING SEQUENCE:
	Result = NCDF_EXISTS()

 INPUTS:
	None.

 KEYWORD PARAMETERS:
	None.

 OUTPUTS:
	Returns TRUE (1) if the NetCDF data format library is supported
	Returns FALSE(0) if it is not.

 CALLS: ***
	NCDF_CONTROL
 COMMON BLOCKS:
	NCDFTEST

 EXAMPLE:
	IF ncdf_exists() EQ 0 THEN Fail,"Library not supported on this machine"

 MODIFICATION HISTORY
	Written by:	Joshua Goldstein,  12/8/92


NORM $RSI/norm.pro
[Previous] [Next]
 NAME:
       NORM

 PURPOSE:
   This function computes the norm of a real or complex vector or array.
   By default, NORM computes the Euclidean norm of a vector, or the
   Infinity norm of an array.

 CATEGORY:
       Complex Linear Algebra.

 CALLING SEQUENCE:
       Result = NORM(A)

 INPUTS:
       A:      An N-element real or complex vector.
               An M by N real or complex array.

 KEYWORD PARAMETERS:
       DOUBLE: If set to a non-zero value, computations are done in
               double precision arithmetic.

   LNORM: Set this keyword to indicate which norm to compute.
       If A is a vector, then the possible values are:
           LNORM=0  Compute the L(Infinity) norm, defined as Max(Abs(A))
           LNORM=1  Compute the L(1) norm, defined as Total(Abs(A))
           LNORM=2  Compute the L(2) norm, defined as Sqrt(Total(Abs(A)^2))
           LNORM=n  Compute the L(n) norm, defined as (Total(Abs(A)^n))^(1/n)
                    n may be any number, float or integer.
           If LNORM is not specified then LNORM=2 is used.
       If A is an array, then the possible values are:
           LNORM=0  Compute the L(Infinity) norm
                    (maximum absolute row sum norm), defined as
                    Max(Total(Abs(A),1))
           LNORM=1  Compute the L(1) norm
                    (maximum absolute column sum norm), defined as
                    Max(Total(Abs(A),2))
           LNORM=2  Compute the L(2) norm (spectral norm), defined as
                    the largest singular value, computed from SVD.
           If LNORM is not specified then LNORM=0 is used.

 CALLED BY:
	COND, EXTRACT_SLICE
 EXAMPLE:
       1) Define an N-element complex vector (a).
            a = [complex(1, 0), complex(2,-2), complex(-3,1)]
          Compute the Euclidean norm of (a).
            result = NORM(a)

       2) Define an M by N complex array (a).
            a = [[complex(1, 0), complex(2,-2), complex(-3,1)], $
                 [complex(1,-2), complex(2, 2), complex(1, 0)]]
          Compute the Infinity norm of the complex array (a).
            result = NORM(a)

 REFERENCE:
       ADVANCED ENGINEERING MATHEMATICS (seventh edition)
       Erwin Kreyszig
       ISBN 0-471-55380-8

       CRC Concise Encyclopedia of Mathematics
       Eric W. Weisstein
       ISBN 0-8493-9640-9

 MODIFICATION HISTORY:
       Written by:  GGS, RSI, April 1992
       Modified:    GGS, RSI, February 1994
                    Computes the Euclidean norm of an N-element vector.
                    Accepts complex inputs. Added DOUBLE keyword.
       Modified:    GGS, RSI, September 1994
                    Added support for double-precision complex inputs.
       Modified:    GGS, RSI, April 1996
                    Modified keyword checking and use of double precision.
       Modified: CT, RSI, May 2001
             Added LNORM keyword. Allows L(1), L(2),..., L(Infinity) norm.
       Modified: CT, RSI, July 2003
             Change SVDC to LA_SVD so complex input is allowed for L(2)
   Modified: CT, RSI, August 2004: Don't allow arrays for LNORM.
       Fix bug for LNORM=2 with integer vectors.
   Modified: CT, RSI, Jan 2005: Use double precision for internal
       calculations, to avoid problems with huge integer inputs.