Home > hfrc > matlab > utility > EOF.m

# EOF

## PURPOSE EOF - computes EOF of a matrix.

## SYNOPSIS function [L, EOFs, EC, error, norms] = EOF( U, n, norm, varargin )

## DESCRIPTION ``` EOF - computes EOF of a matrix.

Usage: [L, EOFs, EC, error, norms] = EOF( M, num, norm, ... )

M is the matrix on which to perform the EOF.  num is the number of EOFs to
return.  If num='all', then all EOFs are returned.  This is the default.

If norm is true, then all time series are normalized by their standard
deviation before EOFs are computed.  Default is false.  In this case,
the fifth output argument will be the standard deviations of each
column.  Note that the norms are not reapplied to the resulting EOFs,
so you will need to do this to get back the final data.

... are extra arguments to be given to the svds function.  These will
be ignored in the case that all EOFs are to be returned, in which case
the svd function is used instead. Use these with care.

Data is not detrended before handling.  Use the detrend function to fix
that.

L are the eigenvalues of the covariance matrix ( ie. they are normalized
by 1/(m-1), where m is the number of rows ).  EC are the expansion
coefficients (PCs in other terminology) and error is the reconstruction
error (L2-norm).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\$Id: EOF.m,v 1.4 2004-09-06 02:03:45 dmk Exp \$

Copyright (C) 2001 David M. Kaplan

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%```

## CROSS-REFERENCE INFORMATION This function calls:
• conj CONJ - takes complex conjugate of HFRC objects. Useful for
• diff DIFF - This function tries to differentiate the variables in
• end END - basic end method for HFRC objects.
• size SIZE - returns [ (num times), (num gridpts) ].
This function is called by:
• EOF EOF - computes EOF on a field of an HFRC object.
• principal_axis PRINCIPAL_AXIS - Finds principal axis of each grid point.

Generated on Mon 18-Dec-2006 07:26:46 by m2html © 2003