Generated from ./wmtsa/ with ROBODoc v4.99.6 on Wed Aug 23 18:14:43 2006

TABLE OF CONTENTS


[Functions] wmtsa.Tests.utils/yn_tcase

[top]

NAME

   yn_case -- munit test case for yn.

USAGE

   run_tcase('yntor_tcase')

INPUTS

   (none)

OUTPUTS

   * tc          -- tcase case struct (tcase_s)

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-Feb-16

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/yn

[top]

NAME

   yn -- Determine Boolean value.

 SYNOPSIS
   [tf] = yn(x, [return_format])

INPUTS

   * x             -- value to check (Boolean numeric or character string)
   * return_format -- (optional) format of returned value, see DESCRIPTION
                      for details (string).

OUTPUTS

  * tf             -- Boolean result (Boolean numeric or character string).

SIDE EFFECTS


DESCRIPTION

  yn evaluates the value of x and determines whether is a reduces to a
  Boolean (true/false) value.  It is a handy utlity for converting between
  formats for Boolean values, i.e. T/F -> true/false -> 1/0 -> Y/N -> yes/no,
  as well as for evaluating expressions within the callers workspace. 
 
  When x is numeric, the function checks the values of the array and
  returns a Boolean value depending on whether all values are zero (false)
  or otherwise (true).
  
  When x is a character string and has the values:
  * 'T', 'TRUE',  'YES', 'Y' (case-insensitive), it returns a value of 'true'
  * 'F', 'FALSE', 'NO', 'N' (case-insensitive),  it returns a value of 'false'

  For other characters strings, the function attempts to evaluate the 
  expression using the specified variables contained in caller's workspace.  
  If the expression can  not be evaluated, an error is thrown.
 
  If x is neither numeric or character, an error is thrown.

  The 'return_format' input argument controls format of the output argument.
  Valid values for 'return_format' are case-insenstive and include:
  * 'numeric'    -- returns 1/0 for Boolean true/false
  * 'tf'         -- returns T/F for Boolean true/false
  * 'truefalse'  -- returns TRUE/FALSE for Boolean true/false
  * 'yn'         -- returns Y/N for Boolean true/false
  * 'yesno'      -- returns YES/NO for Boolean true/false.
  The default value of 'return_format' is 'numeric'.

USAGE

   tf = yn(x)
 
   tf = yn(x, return_type)

ERRORS

   WMTSA:InvalidNumArguments, WMTSA:InvalidStringArgumentValue,
   WMTSA:InvalidArgumentType, WMTSA:InvalidArgumentValue

EXAMPLE

   tf = yn(1)
     % Returns tf = 1
   tf = yn(1, 'tf')
     % Returns tf = 'T"
   tf = yn('F')
     % Returns tf = 0
   tf = yn('T', 'yesno')
     % Returns tf = 'YES'
   x = 1;
   y = 0;
   tf = yn('x == y', 'truefalse')
     % Returns tf = 'FALSE'

 TOOLBOX
   wmtsa/utils

 CATEGORY
   WMTSA Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-02-16

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.signal/wvar_var_fd_sdf_acvs

[top]

NAME

   wvar_var_fd_sdf_acvs  -- Calculate variance of wavelet variance for a FD  process for given wavelet transform filter.

 SYNOPSIS

INPUTS


OUTPUTS


SIDE EFFECTS


DESCRIPTION


USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] Tests.dwt/wtfilter_tsuite

[top]

NAME

    wtfilter_tsuite -- munit test suite to test wtfilter and associated functions.

USAGE

    run_tsuite('wtfilter_tsuite')

INPUTS


OUTPUTS

   ts            = tsuite structure for wtfilter transform testsuite.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-03-02

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/wtfilter_tcase

[top]

NAME

   wtfilter_tcase -- munit test case to test wtfilter.

USAGE

   run_tcase('wtfilter_tcase')

INPUTS

   (none)

OUTPUTS

   tc            = tcase structure for wtfilter testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   wtfilter

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-03-01

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wtfilter

[top]

NAME

   wtfilter -- Define wavelet transform filter coefficients.

 SYNOPSIS
  [wtf] = wtfilter(wtfname, transform)

INPUTS

   * wtfname    -- name of wavelet transform filter (string, case-insenstive).
   * transform  -- name of wavelet transform  (string, case-insenstive).

OUTPUTS

   * wtf        -- wavelet tranform filter struct (wtf_s).

SIDE EFFECTS


DESCRIPTION

   wtfilter returns a wtf_s struct with the wavelet (high-pass) and
   scaling (low-pass) filter coefficients, and associated attributes. 

   The wtf_s struct has fields:
   * g         -- scaling (low-pass) filter coefficients (vector).
   * h         -- wavelet (high-pass) filter coefficients (vector).
   * L         -- filter length (= number of coefficients) (integer).
   * Name      -- name of wavelet filter (character string).
   * WTFclass  -- class of wavelet filters (character string).
   * Transform -- name of transform (character string).

   Typing wtfilter('list') displays a list of supported filters.
 
   Typing wtfilter('all') returns a struct array of wtf_s of all
   supported filters.

   The MODWT filter coefficients are calculated from the DWT filter 
   coefficients:

      ht = h / sqrt(2)
      gt = g / sqrt(2)

   The wavelet filter coefficients (h) are calculated from the scaling
   filter coefficients via the QMF function (wmtsa_qmf).

USAGE

  % Return a wtf struct.
  wtf = wtfilter(wtfname, transform)   

  % Display and return a list of available filter ames.
  wtfnames = wtfilter('list')
  
  % Display and return a struct array of wtf_s for available filters.
  wtfs = wtfilter('all', transform)

ERRORS

   WMTSA:InvalidNumArguments
   WMTSA:MissingRequiredArgument
   WMTSA:InvalidArgumentValue

EXAMPLE

    wtf = wtfilter('LA8', 'modwt')
    wtf = wtfilter('haar', 'dwt')

ALGORITHM


REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

  wtf_s, wtf_qmf

 TOOLBOX
   wmtsa/dwt

 CATEGORY
   Filters: Filters

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-02-28

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS

   Based on the original function (myfilter.m) by Brandon Whitcher.

REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wmtsa_qmf

[top]

NAME

   wmtsa_qmf -- Calculate quadrature mirror filter (QMF).

USAGE

   [b] = function_name(a, [inverse])

INPUTS

   * a           -- filter coefficients (vector).
   * inverse     -- (optional) flag for calculating inverse QMF (Boolean).
                    Default: inverse = 0 (FALSE).

OUTPUTS

    b            - QMF coefficients (vector).

SIDE EFFECTS


DESCRIPTION

    wmtsa_qmf calculates the quadrature mirror filter (QMF) of
    for the specified filter coefficients.  If a is a vector,
    the QMF of the vector is calculated.  If a is a matrix or higher
    order array, the QMF is calculated along the first dimension.

   The inverse flag, if set, calculates the inverse QMF.  inverse
   is a Boolean values specified as (1/0, y/n, T/F or true/false).

EXAMPLE

    % h is the QMF of g.
    g = [0.7071067811865475 0.7071067811865475];
    h = wmtsa_qmf(g);

    % g is the inverse QMF of h.
    h = [0.7071067811865475 -0.7071067811865475];
    g = wmtsa_qmf(h, 1);

ALGORITHM

      g_l = (-1)^(l+1) * h_L-1-l
      h_l = (-1)^l * g_L-1-l
    See pages 75 of WMTSA for additional details.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   yn

 TOOLBOX
   wmtsa/dwt

 CATEGORY
   Filters:  Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-02-02

COPYRIGHT

   (c) 2005  Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.stats/norminv

[top]

NAME

   wmtsa_norminv -- Wrapper function for norm2inv.

 SYNOPSIS
   X = wmtsa_chi2inv(p)
   
   global WMTSA_USE_QGAUSS
   WMTSA_USE_QGAUSS = 1
   X = wmtsa_norminv(p, nu)

INPUTS

   * p    -- probability (lower tail) with range [0,1].

OUTPUTS

   * X    -- corresponding inverse normal culmulative distribution function (cdf).

SIDE EFFECTS


DESCRIPTION

   wmtsa_norminv is a wrapper function for toolbox norminv function.  If the 
   MATLAB Statistics toolbox is installed and a license avaialble, the norminv
   Statistic toolbox norminv funciton is called.  Otherwise, the WMTSA stats
   toolbox QGauss function is called.

   Setting the global variable WMTSA_USE_QGAUSS to 1 will cause the QGauss to
   be used regardless if the MATLAB Statistics toolbox norminv is available.

USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision$

[Functions] wmtsa.Tests.utils/wmtsa_isvector_tcase

[top]

NAME

   wmtsa_isvector_tcase -- munit test case for wmtsa_isvector.

USAGE

   run_tcase('wmtsa_isvector_tcase')

INPUTS

   (none)

OUTPUTS

   * tc          -- tcase case struct (tcase_s)

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/wmtsa_isvector

[top]

NAME

   wmtsa_isvector -- Determine if item is a vector.

 SYNOPSIS
   [tf, nsdim] = wmtsa_isvector(x, [type])

INPUTS

   * x          -- item to check (object).
   * type       -- (optional) type of vector (character string).

OUTPUTS

   * tf         -- flag indicating whether item is a vector (Boolean).
   * nsdim      -- the non-singleton dimension of the vector (integer).

DESCRIPTION

   Function checks if the item is a vector by determining whether it has:
   * two dimensions
   * at least one singleton dimension (length of dimension = 1).
 
   The optional input argument 'type' specifies whether to check for a 
   particular type of vector.  Valid values for type include:
   * 'row'            -- row vector with a singleton dimension of 1
   * 'col','column'   -- column vector with a singleton dimension of 2
   * 'nonsingleton', 'truevector'-- a vector having one non-singleton dimension, i.e.
                         either a row or column vector.
   * 'point'          -- the degenerate case where both dimensions are singletons.
   There is no default value for 'type'.  If 'type' is not specified, any vector 
   (row, column, point) returns a Boolean true.
                         
   If the output argument 'nsdim' is specified, the ordinal value of the
   non-singleton dimension of the vector is returned.  
   Valid values for nsdim are:
   * 1       -- first dimension is non-singleton, i.e. a row vector
   * 2       -- second dimension is non-singleton, i.e. a column vector
   * <empty> -- both dimensions are singleton, i.e. a 'point' vector.

USAGE

   tf = wmtsa_isvector(x)

   tf = wmtsa_isvector(x, type)

   [tf, nsdim] = wmtsa_isvector(x)

ERRORS

   WMTSA:InvalidNumArguments, WMTSA:InvalidArgumentValue 

EXAMPLE

   x = [1:10];
     % A row vector
   tf = wmtsa_isvector(x)
     % Result: tf =  1
   tf = wmtsa_isvector(x, 'row')
     % Result: tf =  1
   tf  = wmtsa_isvector(x, 'col')
     % Result: tf =  0
   y = x';
     % y is a column vector.
   tf  = wmtsa_isvector(y, 'row')
     % Result: tf =  0
   tf  = wmtsa_isvector(y, 'col')
     % Result: tf =  1
   [tf, nsdim] = wmtsa_isvector(y)
     % Result: tf =  1, nsdim = 1
   [tf, nsdim] = wmtsa_isvector(x)
     % Result: tf =  1, nsdim = 2

NOTES

   1.  Starting with version 7, MATLAB features a isvector function.
       wmtsa_isvector is compatiable with MATLAB version but supplies 
       additional functionality.
 
 TOOLBOX
   wmtsa/utils

 CATEGORY
   WMTSA Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-26

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/wmtsa_isscalar_tcase

[top]

NAME

   wmtsa_isscalar_tcase -- munit test case for wmtsa_isscalar.

USAGE

   run_tcase('wmtsa_isscalar_tcase')

INPUTS

   (none)

OUTPUTS

   * tc          -- tcase case struct (tcase_s)

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/wmtsa_isscalar

[top]

NAME

   wmtsa_isscalar -- Determine if item is a scalar.

USAGE

   [tf] = isscalar(x)

INPUTS

   * x          -- item to check (object).

OUTPUTS

   * tf          -- flag indicating whether item is a point (numeric Boolean).

DESCRIPTION

   In MATLAB, points, vectors and matrices all have a dimensionality of two,
   (i.e. ndims(x) = 2).  A point is the degenerate case where an array, has
   size of one in all dimensions, i.e. the array is singleton in all dimensions.
   Function checks whether item is a point by checking that its length
   in all dimensions is one.

ERRORS

   WMTSA:InvalidNumArguments

 TOOLBOX
   wmtsa/utils

 CATEGORY
   WMTSA Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-Feb-03

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/wmtsa_ismatrix_tcase

[top]

NAME

   wmtsa_ismatrix_tcase -- munit test case for wmtsa_ismatrix.

USAGE

   run_tcase('wmtsa_ismatrix_tcase')

INPUTS

   (none)

OUTPUTS

   * tc          -- tcase case struct (tcase_s)

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/wmtsa_ismatrix

[top]

NAME

   wmtsa_ismatrix -- Determine if item is a matrix.

USAGE

   [tf] = wmtsa_ismatrix(x, [type])

INPUTS

   * x           -- item to check (object).
   * type        -- (optional) type of matrix (character string).
                    Valid Values: 'point', 'truevector', 'truematrix'
                    Default: No type specified.

OUTPUTS

   * tf         -- flag indicating whether item is a vector (Boolean).
   * sz         -- size of x (vector of length 2).

DESCRIPTION

   By definition a matrix is a two dimensional array, which degenerates
   to a vector or a point if it has, respectively, one or two singleton 
   dimensions.  In MATLAB, points, vectors and matrices all have a 
   dimensionality of two, (i.e. ndims(x) = 2).  A vector is the case of
   where one dimension has length equal to one. A point is the degenerate 
   case where both dimensions have lengths equal to one.
   The function checks whether item
   * item has 2 dimensions
   If type is specified, it checks whether x is:
   * a 'point' having two singleton dimensions.
   * a 'truevector' having one singleton dimensions.
   * a 'truematrix' having no singleton dimensions.

   If the output argument 'sz' is specified, the size of the dimensions
   of the item are returned.

USAGE

   tf = wmtsa_ismatrix(x)

   tf = wmtsa_ismatrix(x, type)

   [tf, sz] = wmtsa_ismatrix(x)

ERRORS

   WMTSA:InvalidNumArguments, WMTSA:InvalidArgumentValue

EXAMPLE

   x = ones(10,10);
     % A matrix
   tf = wmtsa_ismatrix(x)
     % Result: tf =  1
   tf = wmtsa_ismatrix(x, 'point')
     % Result: tf =  0
   tf  = wmtsa_ismatrix(x, 'truevector')
     % Result: tf =  0
   [tf, sz]  = wmtsa_ismatrix(x)
     % Result: tf =  1, sz = [10 10]

 TOOLBOX
   wmtsa/utils

 CATEGORY
   WMTSA Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-26

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.signal/wmtsa_gen_fd_sdf_acvs

[top]

NAME

   wmtsa_gen_fd_sdf_acvs -- Generate the ACVS from the SDF of fractionally difference (FD) process.

 SYNOPSIS
   s_X = wmtsa_gen_fd_sdf_acvs(N, delta, sigma_squared)

INPUTS

   * N           -- number of data points in series (integer).
   * delta       -- long memory parameter for FD process (vector).
   * sigma_squared -- (optional) process variance.
                    Default:  1

OUTPUTS

   * s_X         -- ACVS of SDF of FD process (2*N+1 x length(delta) array).

SIDE EFFECTS


DESCRIPTION

   For given delta(s) and series length N, function calculates the 
   autocovariance sequence (ACVS) of the spectral density function (SDF)
   of a fractionally differenced (FD) process.

   delta may be vector of values in the range -1 =< delta < 0.5.

USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wmtsa_encode_errmsg

[top]

NAME

   wmtsa_encode_errmsg  -- Encode error message for given err_id.

 SYNOPSIS
   [errmsg] = wmtsa_encode_errmsg(err_id, [varargin])

INPUTS

   err_id        =  error id.
   varagin       =  variable argument list.

OUTPUTS

   errmsg        =  error message.

SIDE EFFECTS


DESCRIPTION

   Function encodes an error message for a specified err_id using
   the variable number of arguments passed on the funtion call.

EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] toolbox.subdirectory/wmtsa_data

[top]

NAME

   wmtsa_data_tcase -- munit test case to test wmtsa_data.

USAGE

   run_tcase('wmtsa_data_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for wmtsa_data testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   wmtsa_data

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.data/wmtsa_data

[top]

NAME

   wmtsa_data -- Load a WMTSA dataset.

 SYNOPSIS
   wmtsa_data(dataset)
   [X, att] = wmtsa_data(dataset)
   [dataset_list] = wmtsa_data('datasets')

INPUTS

   * dataset    -- name of sample dataset (string).

OUTPUTS

   * out        -- listing of available datasets (cell array of strings).

SIDE EFFECTS


DESCRIPTION

   wmtsa_data loads a dataset into the caller's workspace.  Two variables
   are created in the caller's workspace:
   * dataset     -- variable containing the data
   * dataset_att -- attributes of dataset.

   A function named 'load_<dataset>' exists for each dataset and contains the
   instructions on how to load the dataset and create its attributes. The load
   functions reside in the same directory (toolbox) as the wmtsa_data function.

   Calling wmtsa_data('datasets') displays a list of available datasets and
   returns a list to the output argument.

USAGE

   wmtsa_data('ecg')                % Creates ecg and ecg_att variables in workspace.
   [X, att] = wmtsa_data('ecg')     % Creates X and att variables in workspace.

   wmtsa_data('ecg_la8_modwt')      % Creates ecg MODWT coefficients
                                    % (ecg_WJt, ecg_VJ0t, ecg_WJt_att)
   [WJt, VJ0t, att] = wmtsa_data('ecg_la8_modwt')  
                                    % Creates WJt, VJ0t and att variables in workspace.

EXAMPLE

   wmtsa_data('ecg');

WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-01-26

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.stats/chi2inv

[top]

NAME

   wmtsa_chi2inv -- Wrapper function for chi2inv

 SYNOPSIS
   X = wmtsa_chi2inv(p, nu)
   
   global WMTSA_USE_QCHISQ
   WMTSA_USE_QCHISQ = 1
   X = wmtsa_chi2inv(p, nu)

INPUTS

   * p    -- probability (lower tail) with range [0,1].
   * nu   -- degrees of freedom

OUTPUTS

   * X    -- corresponding inverse of chi-square cdf.

SIDE EFFECTS


DESCRIPTION

   wmtsa_chi2inv is a wrapper function for toolbox chi2inv function.  If the 
   MATLAB Statistics toolbox is installed and a license avaialble, the chi2inv
   Statistic toolbox norminv funciton is called.  Otherwise, the WMTSA stats
   toolbox QGauss function is called.

   Setting the global variable WMTSA_USE_QCHISQ to 1 will cause the QChisq to
   be used regardless if the MATLAB Statistics toolbox chi2inv is available.

USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision$

[Functions] wmtsa.Tests.dwt./wmtsa_ccvs_tcase

[top]

NAME

   wmtsa_ccvs_tcase -- munit test case to test wmtsa_ccvs.

USAGE

   run_tcase('wmtsa_ccvs_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for wmtsa_ccvs testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   wmtsa_ccvs

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wmtsa_ccvs

[top]

NAME

   wmtsa_ccvs -- Calculate the cross covariance sequence (CCVS) of a data series.

 SYNOPSIS
   CCVS = wmtsa_ccvs(X, [dim], [estimator], [subtract_mean], [method])

INPUTS

   * X           -- set of observations (matrix or vector).
   * Y           -- set of observations (matrix or vector).
   * dim         -- (optional) dimension to calculate CCVS over (integer).
   * estimator   -- (optional) type of estimator
                    Valid values:  'biased', 'unbiased', 'none'
                    Default: 'biased'
   * subtract_mean -- (optional) flag whether to subtract mean
                    (numeric Boolean).
                    Default: 1 = subtract mean
   * method      -- method used to calculate CCVS (character string).

OUTPUTS

   * CCVS        -- crossvariance sequence (CCVS) (vector of length N).

SIDE EFFECTS

   X, Y are real; otherwise error.
   X, Y are vectors or matrices; otherwise error.

DESCRIPTION

   wmtsa_ccvs calculates the crosscovariance sequence (CCVS) for a real valued
   series.
 
   By default, the function calculates the CCVS over the first non-singleton
   dimension.  For the current implementation X and Y must be a vectors or
   matrices; higher order arrays not handled.  If X and Y are a vectors, CCVS is 
   is returned with dimensions as X.  If X and Y are matrices, CCVS is 
   calculated for the columns. If input argument 'dim' is supplied, 
   the CCVS is calculated over that dim.
   
   The estimator option normalizes the CCVS estimate as follows:
   * 'biased'   -- divide by N
   * 'unbiased' -- divide by N - tau
   * 'none'     -- unnormalized.

   The 'subtract_mean' input argument specifies whether to subtract
   the mean from the prior to calculating the CCVS. The default is 1 =
   'subtract mean'.

   The 'method' input argument specifies the method used to calculate
   the CCVS:
   * 'lag'     -- Calculate taking lag products.
   * 'fft'     -- Calculate via FFT.
   The default is 'fft'.

ERRORS

   WMTSA:InvalidNumArguments, WMTSA:InvalidArgumentDataType,
   WMTSA:InvalidArgumentValue 

EXAMPLE


ALGORITHM

   See page 266 of WMTSA for definition of CCVS.
   See page 269 of WMTSA for definition of biased CCVS estimator.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   wmtsa_acvs

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-04-23

 CREDIT
   Based on original function myACF.m by Brandon Whitcher.

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wmtsa_biased_ccvs

[top]

NAME

   wmtsa_biased_ccvs -- Calculate the biased cross covariance sequence (CCVS)
      of two data series.

 SYNOPSIS
   CCVS = wmtsa_biased_ccvs(X, Y)

INPUTS

   X            - vector of observations.
   Y            - vector of observations.

OUTPUTS

   CCVS         - cross covariance sequence (CCVS) of X and Y.

DESCRIPTION


EXAMPLE


ALGORITHM

   See page 269 of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-04-23

 Credits:
   Based on original function myACF.m by Brandon Whitcher.

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/wmtsa_acvs_tcase

[top]

NAME

   wmtsa_acvs_tcase -- munit test case to test wmtsa_acvs.

USAGE

   run_tcase('wmtsa_acvs_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for wmtsa_acvs testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   wmtsa_acvs

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wmtsa_acvs

[top]

NAME

   wmtsa_acvs -- Calculate the autocovariance sequence (ACVS) of a data series.

 SYNOPSIS
   ACVS = wmtsa_acvs(X, [dim], [estimator], [subtract_mean], [method], [dim])

INPUTS

   * X           -- set of observations (array).
   * estimator   -- (optional) type of estimator
                    Valid values:  'biased', 'unbiased', 'none'
                    Default: 'biased'
   * subtract_mean -- (optional) flag whether to subtract mean
                    (numeric Boolean).
                    Default: 1 = subtract mean
   * method      -- (optional) method used to calculate ACVS (character string).
   * dim         -- (optional) dimension to compute ACVS along (integer).
                    Default: 1 or first non-singular dimension.

OUTPUTS

   * ACVS        -- autocovariance sequence (ACVS) (vector or matrix).

SIDE EFFECTS

   X is a real; otherwise error.
   X is a vector or matrix; otherwise error.

DESCRIPTION

   wmtsa_acvs calculates the autocovariance sequence (ACVS) for a real valued
   series.
 
   By default, the function calculates the ACVS over the first non-singleton
   dimension.  For the current implementation X must be a vector or matrix, 
   higher order arrays not handled. If X is a vector, ACVS is returned with 
   dimensions as X.  If X is a matrix, ACVS is calculated for the columns.
   If input argument 'dim' is supplied, the ACVS is calculated over that dim.
   
   The estimator option normalizes the ACVS estimate as follows:
   * 'biased'   -- divide by N
   * 'unbiased' -- divide by N - tau
   * 'none'     -- unnormalized.

   The 'subtract_mean' input argument specifies whether to subtract
   the mean from the prior to calculating the ACVS. The default is to
   subtract them mean.

   The 'method' input argument specifies the method used to calculate
   the ACVS:
   * 'lag'     -- Calculate taking lag products.
   * 'fft'     -- Calculate via FFT.
   * 'xcov'    -- Calculate via xcov function.
   The default is 'fft'.

ERRORS

   WMTSA:InvalidNumArguments, WMTSA:InvalidArgumentDataType,
   WMTSA:InvalidArgumentValue 

EXAMPLE


ALGORITHM

   See page 266 of WMTSA for definition of ACVS.
   See page 269 of WMTSA for definition of biased ACVS estimator.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-04-23

 CREDIT
   Based on original function myACF.m by Brandon Whitcher.

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/wavelet_filter

[top]

NAME

   wavelet_filter -- Compute wavelet filter coefficents from scaling filter coefficients.

 SYNOPSIS
   h = wavelet_filter(g)

INPUTS

   g            - vector of scaling filter coefficeints

OUTPUTS

   h            - vector of wavelet filter coefficeints

DESCRIPTION


ALGORITHM

   See equation 75a of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-01

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/verify_datatype_tcase

[top]

NAME

   verify_datatype_tcase -- munit test case to test verify_datatype.

USAGE

   run_tcase(@verify_datatype_tcase)

INPUTS


OUTPUTS

   tc            = tcase structure for verify_datatype testcase.

SIDE EFFECTS


DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-18

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/verify_datatype

[top]

NAME

   verify_datatype -- Verify the datatype(s) of a variable.

 SYNOPSIS
   [tf, msg] = verify_datatype(var, datatypes, var_name)

INPUTS

   * var        -- variable to verify (object)
   * datatypes  -- expected data type(s) of the arg.
                   See verify_datatypes function for possibles datatypes 
                   to check (string or cell array of strings).
   * var_name   -- (optional) alternative name of variable to use in 
                   error message (string).

OUTPUTS

   * tf         -- flag indicating whether object as specified datatype(s).
                   (Boolean).
   * msg     -- diagnostic error message (string).

SIDE EFFECTS

   Function call requires a mininum of two input arguments; otherwise error.

DESCRIPTION

   verify_datatypes checks whether the specified object has the specified
   data type(s). If the datatypes argument is a cell array of strings, then the
   function checks whether the variable datatype matches each and all of the 
   datatypes.  The function returns a logical true if the object's datatypes
   match those specified by the 'datatypes' argument; otherwise a logical false
   is returned.

   Possible datatypes to check include:
   * 'posint'              -- All are positive integers --> integer value(s) > 0.
   * 'int0'                -- All are positive integers plus zero --> integer value(s) >= 0.
   * 'int','integer'       -- All are integers --> any integer value(s).
   * 'real'                -- All are real numbers.
   * 'num','numeric'       -- All are numeric.
   * 'struct','structure'  -- Is a structure.
   * 'char','character','string' - Is a character string.
   * 'scalar               -- Is a point (size of all dimensions = 1).
   * 'vec','vector'        -- Is a vector (i.e. MxN, with M and/or N = 1).
   * 'matrix'              -- Is a matrix (i.e. dim = 2).
   * 'nonsingleton', 'truevector' -- Is a vector (i.e. MxN with M *or* N = 1).
   * 'row','rowvector'     -- Is a row vector (i.e. M x 1).
   * 'col','columnvector'  -- Is a column vector (i.e. 1 x N).
   * 'finite'              -- All are finite.
   * 'nonsparse'           -- Is a non-sparse matrix.

EXAMPLE


ERRORS

  WMTSA:InvalidNumArguments, WMTSA:InvalidArgumentType, WMTSA:InvalidArgumentValue

NOTES


SEE ALSO

   argterr

 TOOLBOX
   wmtsa/utils

 CATEGORY
   WMTSA Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

    2005-02-17

COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/validate_opts

[top]

NAME

   validate_opts -- Validate opts fieldnames.

 SYNOPSIS
   [errmsg] = validate_opts(opts, valid_opts)
   [errmsg] = validate_opts(opts, valid_opts, 'string')
   [errstruct] = validate_opts(opts, valid_opts, 'struct')

INPUTS

   * opts       -- name-value pairs to validate (struct).
   * valid_opts -- valid opts names (struct or cell array of strings).

OUTPUTS

   * errmsg        -- error message (string).
   * errstruct     -- error struct with fields:  message, identifier.

SIDE EFFECTS

   Function call requires a minimum of 2 input arguments; otherwise error.

DESCRIPTION

   validate_opts validates the fieldnames in the struct 'opts' against a
   list of possible option names contained in valid_opts.  valid_opts may
   be another struct or a cell array of strings.

   If all fieldnames are valid, the function returns with empty output 
   arguments.  If the function encounters an opt fieldname not found in
   the set of valid fieldnames, it returns an error message encoding
   the name of invalid opt fieldname.

USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/utils_tsuite

[top]

NAME

   utils_tsuite -- munit test suite to test utils.

USAGE


INPUTS


OUTPUTS

   ts            = tsuite structure for utils testsuite.

SIDE EFFECTS


DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-18

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/set_opts_defaults

[top]

NAME

   set_opts_defaults -- Set default values for opts.

 SYNOPSIS
   [opts] = set_opts_defaults(opts, opts_defaults)

INPUTS

   * in_opts          -- set of name-value pairs (struct).
   * opts_defaults -- default values for opts (struct).
   * default_fields_only -- return opts struct with default fields (logical)

OUTPUTS

   * out_opts          -- name-value pairs with default values (struct).

SIDE EFFECTS


DESCRIPTION


USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 614 $

[Functions] wmtsa.utils/set_infomsg_verbosity_level.m

[top]

NAME

   set_infomsg_verbosity_level -- Set and return numeric value of VERBOSE to the verbose level for informational messages.

USAGE

   VERBOSITY = set_infomsg_verbosity_level(verbosity_level)

INPUTS


OUTPUTS

   verbosity_level =  verbosity level, integer or character value
                      Valid Values: an integer or character string with 
                      possible values: 
                                    -1, silent
                                     0, operational, none
                                     1, verbose
                                     2, very, veryvebose
                                     3, extremely, extremelyvebose
                      Default:       0 = operational

SIDE EFFECTS

   Error is raised if verbosity_level is an invalid value.

DESCRIPTION

   Function sets the value of the global variable VERBOSITY to
   following values:
      1  for verbose messaging
      2  for very verbose messaging
      3  for extremely verbose messaging.

   When infomsg is called with a verbosity_level, the message is
   displayed based on the value of the global variable VERBOSITY
   set via set_infomsg_verbosity_level or manually.

NOTES

   1.  Global variable VERBOSITY must be declared in the calling base or
       caller workspace prior to executing set_infomsg_verbosity.
   2.  Value of verbosity_level may be an integer or character.  The
       function evaluates verbosity_level, determineds the integer
       value of verbosity_level and sets VERBOSITY.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/08

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/set_defaults

[top]

NAME

   set_defaults_tcase -- munit test case to test set_defaults.

USAGE

   run_tcase('set_defaults_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for set_defaults testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   set_defaults

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-19

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/set_defaults

[top]

NAME

    set_defaults -- Create variables with default values if non-existant in workspace.

 SYNOPSIS
   set_defaults(defaults, [var_names])

INPUTS

   * defaults   -- strut of name-value pairs of defaults (struct).
   * var_names  -- (optional) names of specific variables to set defaults
                   (string or cell array of strings).

OUTPUTS


SIDE EFFECTS

   Function call requires a minimum of 1 input arguments; otherwise error.

DESCRIPTION

   set_defaults checks whether variable(s) exist in the caller's workspace,
   and, if not, creates them with the supplied default values.  The default
   values are passed as a set of name-value pairs via the 'defaults' struct
   argument.  If the 'var_names' argument is specified, then only those 
   variables in var_names are created.  Other all variables with the
   fieldnames in 'defaults' are created.

USAGE


WARNINGS


ERRORS


EXAMPLE

   defaults.a = 1;
   defaults.b = 'abc';
   defaults.c = {'xyz', 1, 2, 3};
   
   % Example 1 - Create all variables with defaults;
   %             Variables do not exist in caller's workspace.              
   clear a b c
   set_defaults(defaults);
   whos a b c

   % Example 2 - Create those variables that do not exist in caller's workspace.
   clear a b c
   b = 2
   set_defaults(defaults);
   whos a b c
   b

   % Example 3 - Create specific variables with defaults.
   %             Some variables do exist in caller's workspace.              
   clear a b c
   a = 9
   var_names = {'a', 'b'}
   set_defaults(defaults);
   whos a b c

NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/set_default

[top]

NAME

   set_default_tcase -- munit test case to test set_default.

USAGE

   run_tcase('set_default_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for set_default testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   set_default

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-19

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/set_default

[top]

NAME

   set_default -- Set default value for a variable in workspace.

 SYNOPSIS
   set_default(var_name, default)

INPUTS

   * var_name   -- Name of variable to check and set value (string).
   * default    -- Value to set (various datatypes).

OUTPUTS

   (none)

SIDE EFFECTS


DESCRIPTION

   set_defaults checks whether a variable with the name 'var_name' exists
   in the caller's workspace.  If the variable  does not exist, the function
   creates a variable the 'var_name' name and sets its value to 'default.  
   If the variable does exist, the function leaves the variable value unchanged.

ERRORS


EXAMPLE

   set_default('x', 1);

NOTES

   set_default creates and sets the default value for a single variable.
   The set_defaults function creates and sets the default values for multiple
   variables.

SEE ALSO

   set_defaults

 TOOLBOX
   wmtsa/utils

 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-08-01

COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/set_axes_prop

[top]

NAME

   set_plot_prop - Set properties of given axes.

 SYNOPSIS
   [haxes] = set_axes_prop(haxes, axesProp)

INPUTS

   haxes        = handle of axes to set properties.
   axesProp     = stucture containing name-value pairs of axes properties to set.

OUTPUTS

   haxes        = handle to axes of properties set.

DESCRIPTION

   set_axes_prop takes a structure containing a set of field name-value pairs
   and sets property values of the named properties for the specified axes.
   The X/Y/ZLabel property is treated specially, since this is a property of
   the label (i.e. Text) object.

EXAMPLE

   axesProp.XLim = [0, 10];
   axesProp.XTick = [0:5:10];
   axesProp.XTickLabel = axesProp.XTick;
   axesProp.XLabel = 'x axis';
   ha = gca;
   set_axes_prop(ha, axesProp);

ERRORS

   If field name is not a valid axes property name, error occurs.

SEE ALSO

   axes, Axes Properties

 TOOLBOX
   wmtsa/plotutil

 CATEGORY
   Plotting Utilties

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-02-03

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/rgb2colorspecname

[top]

NAME

   rgb2colorspecname -- Look up ColorSpec name by rgb value.

USAGE

   [colorspecname] = rgb2colorspecname(rgb, [format])

INPUTS

   rbg          - three-element row vector whose elements specify the 
                  intensities of the red, green, and blue components of 
                  the color; the intensities must be in the range [0 1]. 
   format       - (optional) format for name, either 'short' or 'long'
                  Default:  'short'

OUTPUTS

   colorspecname - name of ColorSpec in specified format

SIDE EFFECTS

   rgb must be RGB value for one of eight primary colors; otherwise error.

DESCRIPTION

   Funciton converts a RGB 3-element vector to its equivalent name,
   in either ColorSpec name in either short (default) format 
   (single letter) or long format (complete name).

   Possible ColorSpec names:
     yellow
     magenta 
     cyan
     red
     green
     blue
     white
     black

SEE ALSO

   ColorSpec

 TOOLBOX
   wmtsa

 CATEGORY
   utils

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-05

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] toolbox.subdirectory/plot_wvar

[top]

NAME

   plot_wvar_tcase -- munit test case to test plot_wvar.

USAGE

   run_tcase('plot_wvar_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for plot_wvar testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   plot_wvar

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/plot_wvar_psd

[top]

NAME

   plot_wvar_psd_tcase -- munit test case to test plot_wvar_psd.

USAGE

   run_tcase('plot_wvar_psd_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for plot_wvar_psd testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   plot_wvar_psd

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_wvar_psd

[top]

NAME

   plot_wvar_psd -- Plot band-averaged power spectral density (PSD) 
     estimated from wavelet variance.

 SYNOPSIS
   haxes = plot_wvar_psd(f, CJ, f_band, CI_CJ, mode, LineSpec)

INPUTS

   f            = center frequency (geometric mean) of octave band.
                  (Jx1 vector)
   CJ           = estimate of average of power spectral density per octave band.
                  (Jx1 vector)
   f_band       = (optional) lower and upper bounds of frequency octave band,
                  (Jx2 vector)
   CI_CJ        = (optional) confidence interval of power spectral density estimate,
                  (Jx2 array), lower bound (row 1) and upper bound (row 2).
   mode         = (optional) type of plot
                  Valid values:  'point', 'staircase', 'box'
                  Default value: 'point'
   LineSpec     = (optional) LineSpec string
   axes_scale   = (optional) Type of axes scale to use
                  Valid values:  'linear', 'loglog', 'semilogx', 'semilogy'
                  Default value: 'loglog'
   axesProp     = (optional) structure containing name-value pairs of axes
                  properties to override (see axes).

OUTPUTS

  haxes         = handle to plot axes

SIDE EFFECTS


DESCRIPTION

   plot_wvar_psd plots the MODWT estimate (CJ) of the spectral density
   function (SDF) average on a log-log axes.  The function plots the SDF 
   for the follwing  modes:
     - 'point'     = plots as points the average value of the SDF at the
                     geometric mean of the octave frequency band.
     - 'line'      = plots as a line the average value of the SDF at the 
                     geometric mean of the octave frequency band.
     - 'staircase' = plots the average value of SDF as a series of staircase
                     with step width equal to width of the octave frequency
                     band.
     - 'box'       = plots an uncertainity box whose dimensions are the 
                     octave frequency band (width) and confidence interval
                     of CJ.

EXAMPLE

   [WJt, VJ0t] = modwt(X, 'la8', 10, 'reflection');
   [wvar, CI_wvar] = modwt_wvar(WJt);
   [f, CJ, f_band, CI_CJ] = modwt_wvar_sdf(wvar, delta_t, CI_wvar);
   plot_wvar_psd(f, CJ, '', '', 'point');
   hold on;
   plot_wvar_psd(f, CJ, f_band, '', 'staircase');
   hold on;
   plot_wvar_psd(f, CJ, f_band, CI_CJ, 'box');

WARNINGS


ERRORS


NOTES

   1. For 'staircase' mode, f_band is a required input argument.
   2. For 'box' mode, f_band and CI_CJ are required input arguments.

BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-11-12

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_wvar

[top]

NAME

   plot_wvar    - Plot the wavelet variance and confidence intervals.

 SYNOPSIS
   [haxes] = plot_wvar(wvar, [CI_wvar], [title_str], [ylabel_str], [LineSpec], ...
                      [axesProp], [level_range], [plotOpts])

INPUTS

   wvar         = wavelet variance(s) (Jx1 vector of cell array of vectors).
   CI_wvar      = (optional) confidence interval of wavelet variance,
                  (Jx2 array  or a cell array of Jx2 arrays)
                  lower bound (column 1) and upper bound (column 2).
   title_str    = (optional) character string containing title for the plot.
   ylabel_str   = (optional) character string containing first line of ylabel for plot.
   LineSpec     = (optional) character string containing LineSpec (see plot).
   axesProp     = (optional) structure containing name-value pairs of axes
                  properties to override (see axes).
   level_range  = (optional) number or range of numbers indicating subset of
                  levels (j's) to plot.
   plotOpts     = (optional) structure containing plot options.

OUTPUTS

   haxes        = handle to axes of wavelet variance plot.

SIDE EFFECTS


DESCRIPTION

   plot_wvar plots the wavelet variance and optionally confidence intervals
   on a semilog y-axes as a function of level.  By default, the wavelet
   variance is plotted for range of levels from 0 to max(level) rounded
   up to next even number.  Use axesProp.XLim to change the limits
   for range of levels to plot.

   The argument plotOpts is structure with fields controlling plotting
   options as follows:

     LabelScales = boolean flag indicating whether to add a second set of
                   labels at min and max x-axis values with physical scale
                   based on value of DeltaT.  A second x-axis label titled
                   scale is added to the x-axis.
     DeltaT      = sampling interval of time series in physical units.
     DeltaTUnits = units of sample unit DeltaT.  If specified, units is
                   is added to second x-axis label for the scale labels.
     LegendList  = character cell array to add a legend to plot using 
                   the values contained in the cell array.
     LegendPos   = integer indicating where to place legend on plot.
                   See legend for possible values and default.
     LineSpecList = cell array of LineSpec values to use for plotting
                   wvar and confidence intervals.
     PlotErrorBar = boolean flag indicating to plot confidence intervals
                   as error bars.

 EXAMPLES
   [WJ0t, VJ0t] = modwt(X, 'la8', 6, 'reflection')
   [wvar, CI_wvar] = modwt_wvar(WJt)
   axesProp.XLim = [0, 10]
   plotOpts.LabelScales = 1
   plotOpts.DeltaT = (1 / 25) * 4  % Sample rate of 25 Hz times 4 m/s sensor
                                   %  velocity
   plotOpts.DeltaTUnits = 'm'
   plot_wvar(wvar, CI_wvar, 'Wavelet Variance', 'w', '', axesProp, '', plotOpts)

NOTES

   The function expects that complete vectors of wavelet varianaces
   and confidence levels are passed in as arguments.  To plot a subset
   of points to plot, use the level_range argument.

BUGS

   When first used in a new figure window, an extra line of spacing occurs
   between x-ticklabels and xlabel for primary and secondary x-axis labels.
   Reissuing the command in the same figure window will create appropriate
   line spacing.

SEE ALSO

   modwt_wvar, plot, LineSpec, axes

 TOOLBOX
   wmtsa/plotutils

 CATEGORY
   WMTSA Plotting: Wavelet Variance

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/04/23

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_wcov

[top]

NAME

   plot_wcov -- Plot the wavelet covariance and confidence intervals.

 SYNOPSIS
   [haxes] = plot_wvcov(wcov, [CI_wvar], [title_str], [ylabel_str], [LineSpec], ...
                      [axesProp], [level_range], [plotOpts])

INPUTS

   wcov         = vector containing wavelet covariance for J levels.
   CI_wcov      = (optional) Jx2 matrix containing confidence intervals of wcov,
                  lower bound (column 1) and upper bound (column 2)
   title_str    = (optional) character string containing title for the plot.
   ylabel_str   = (optional) character string containing first line of ylabel for plot.
   LineSpec     = (optional) character string containing LineSpec (see plot).
   axesProp     = (optional) structure containing name-value pairs of axes
                  properties to override (see axes).
   level_range  = (optional) number or range of numbers indicating subset of
                  levels (j's) to plot.
   plotOpts     = (optional) structure containing plot options (unused at present).

OUTPUTS

   haxes        = handle to axes of wavelet covariance plot.

SIDE EFFECTS


DESCRIPTION

   plot_wcov plots the wavelet covariance and optionally confidence intervals
   on a semilog y-axes as a function of level.  By default, the wavelet
   variance is plotted for range of levels from 0 to max(level) rounded
   up to next even number.  Use axesProp.XLim to change the limits
   for range of levels to plot.

EXAMPLE

   [WJ0t_x, VJ0t_x] = modwt(X, 'la8', 6, 'reflection')
   [WJ0t_y, VJ0t_y] = modwt(Y, 'la8', 6, 'reflection')
   [wcov, CI_wcov] = modwt_wcov(WJt_x, WJt_y)
   axesProp.XLim = [0, 10]
   plot_wvar(wvar, CI_wvar, 'Wavelet Variance', 'w', '', axesProp)

NOTES


SEE ALSO

   modwt_wcov

 TOOLBOX
   wmtsa/plotutils

 CATEGORY
   WMTSA Plotting: Wavelet Coariance

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/04/24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_wcor

[top]

NAME

   plot_wcor -- Plot the wavelet correlation and (optionally) confidence intervals.

 SYNOPSIS
   plot_wcor(wcor, [CI], [ylabel_str], [title_str])

INPUTS

   wcor          = vector containing wavelet corrrelation for J levels.
   CI            = Jx2 matrix containing 95% confidence intervals,
                   lower bound (column 1) and upper bound (column 2)
   ylabel_str   = string containing first line of ylabel for plot
   title_str    = string containing title for the plot

OUTPUTS


SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/04/24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_modwt_wvar_ci_comparison

[top]

NAME

 plot_modwt_wvar_ci_comparison -- Plot MODWT wavelet variance and confidence intervals calculated via different methods.

 SYNOPSIS
   plot_modwt_wvar_ci_comparison(WJt, [ylabel_str], [title_str])

INPUTS

    WJt        = NxJ matrix containing MODWT-computed wavelet coefficients
                 where N = number of time intervals,
                       J = number of levels
   ylabel_str  = string containing first line of ylabel for plot
   title_str   = string containing title for the plot

OUTPUTS


SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_modwt_rcwsvar

[top]

NAME

 plot_modwt_rcwsvar -- Plot the rotated cumulative sample variance of the MODWT wavelet coefficients.

USAGE

   [haxes]  = plot_modwt_rcwsvar(rcwsvar, [title_str], [xaxis], [xlabel_str], ...
                                 [axesProp], [level_range])

INPUTS

   rcwsvar      = NxJ containing rotated cumulative sample variance of
                    the MODWT wavelet coefficients
   title_str    = (optional) character string or cell array of strings containing title of plot.
   xaxis        = (optional) vector of values to use for plotting x-axis.
   xlabel_str   = (optional) character string or cell array of strings containing label x-axis.
   axesProp     = (optional) structure containing axes property values to
                     override for C subplot.
   level_range  = (optional) number or range of numbers indicating subset of
                    levels (j's) to plot.  

OUTPUTS

   haxes   =  (optional) handle to axes for original data series (C) subplot.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/16

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_modwt_coef2

[top]

NAME

   plot_modwt_coef2 -- Plot the MODWT wavelet and scaling coefficients and the 
                     original time series (individual subplots version).
 SYNOPSIS
   [hWplotAxes, hXplotAxes] = plot_modwt_coef2(WJt, VJ0t, [X], w_att, ... 
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [WplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range], [scale_str])
   [hWplotAxes, hXplotAxes] = plot_modwt_coef2(WJt,   [], [X], w_att, ...
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [WplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range], [scale_str])
   [hWplotAxes, hXplotAxes] = plot_modwt_coef2([],  VJ0t, [X], w_att, ...
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [WplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range], [scale_str])

INPUTS

   WJt           =  NxJ array of MODWT wavelet coefficents
                    where N = number of time intervals,
                          J = number of levels
   VJ0t          =  Nx1 vector of MODWT scaling coefficients at level J0.
   X             =  (optional) vector of observations of size N.
   * w_att        -- MODWT transform attributes (struct).
   title_str     =  (optional) character string or cell array of strings containing title of plot.
   xaxis         =  (optional) vector of values to use for plotting x-axis.
   xlabel_str    =  (optional) character string or cell array of strings containing label x-axis.
   WplotAxesProp =  (optional) structure containing axes property values to
                    override for W subplot.
   XplotAxesProp =  (optional) structure containing axes property values to
                    override for X subplot.
   J0            =  (optional) override value of J0, if J ~= J0 or
                    if max(level_range) ~= J0.
   level_range   =  (optional) number or range of numbers indicating subset of
                    levels (j's) to plot.
   plotOpts      =  (optional) structure containing plot options.
   masterPlotFrame = (optional) structure containing coordinates to 
                     place X and W plots.
   xaxis_range   =  (optional) range of xaxis values to plot.
   scale_str     =  (optional) character cell array of strings containing
                    physcial scale values of levels to label left y-axis of W plot.

OUTPUTS

   hWplotAxes    =  (optional) handle to axes for MODWT coefficients (W) subplot.
   hXplotAxes    =  (optional) handle to axes for original data series (X) subplot.

SIDE EFFECTS

   1. If plotting VJ0t, without WJt (i.e. WJt = []), must specify a value for
      J0; otherwise error.
   2. If a level_range is specified, must provide a value for J0; otherwise
      error.
   3. Either WJt or VJ0t,  or both WJt and VJ0t may be specified'; otherwise
      error.

DESCRIPTION

   plot_modwt_coef plots the MODWT coefficients and optionally the original
   data series, each as indivual subplots.  It is similar to plot_modwt_coef
   but differs in that thate wavelet coefficeints at each level and scaling 
   coefficients at J0 level are plotted on their individual plot axes.
   By default, the Y-axis of each level is scaled to min and max values
   of the coefficients at that level.

   Either or both the MODWT wavelet and scaling coefficients
   may be plotted.  The MODWT coefficients are circularly shifted at each
   level so as to properly align the coefficients with the original data
   data series.

   By default, the wavelet coefficients (WJt) and scaling coefficient at
   level J0 (VJ0t) are plotted.  A subrange of wavelet coefficient levels
   may be specified by via the parameter, level_range = [lower:upper]

   By default, the boundaries demarcing the circularly shifted MODWT
   coefficients influenced by the circularity conditions are plot.  
   Plotting of the boundaries may be toggled off.

   By default, the mean value of VJ0t is subtracted from VJ0t, so that
   when plotting a data series with large mean offsets, the VJ0t level
   does not dominate the Wplot.

   Defaults for plotOpts:
     plotOpts.PlotMODWTBoundary = 1;
     plotOpts.PlotWJt = 1;
     plotOpts.PlotVJ0t = 1;
     plotOpts.PlotX = 1;
     plotOpts.SubtractMeanVJ0t = 1;

EXAMPLE

    [WJt, VJ0t] = modwt(X, 'la8', 10, 'reflection');
    plot_modwt_coef(WJt, VJ0t, X, 'la8');

NOTES


TODO

    Plotting of MODWT Boundaries is not currently implement.

REFERENCES


SEE ALSO

   plot_modwt_coef, modwt, modwt_filter, overplot_modwt_cir_shift_coef_bdry,

AUTHOR

   Charlie Cornish

CREATION DATE

   2004/02/17

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_modwt_coef

[top]

NAME

   plot_modwt_coef -- Plot the MODWT wavelet and scaling coefficients and the
      original time series.

 SYNOPSIS
   [hWplotAxes, hXplotAxes] = plot_modwt_coef(WJt, VJ0t, [X], w_att, ... 
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [WplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range], [scale_str])
   [hWplotAxes, hXplotAxes] = plot_modwt_coef(WJt,   [], [X], w_att, ...
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [WplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range], [scale_str])
   [hWplotAxes, hXplotAxes] = plot_modwt_coef([],  VJ0t, [X], w_att, ...
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [WplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range], [scale_str])

INPUTS

   WJt           =  NxJ array of MODWT wavelet coefficents
                    where N = number of time intervals,
                          J = number of levels
   VJ0t          =  Nx1 vector of MODWT scaling coefficients at level J0.
   X             =  (optional) vector of observations of size N.
   * w_att        -- MODWT transform attributes (struct).
   title_str     =  (optional) character string or cell array of strings containing title of plot.
   xaxis         =  (optional) vector of values to use for plotting x-axis.
   xlabel_str    =  (optional) character string or cell array of strings containing label x-axis.
   WplotAxesProp =  (optional) structure containing axes property values to
                    override for W subplot.
   XplotAxesProp =  (optional) structure containing axes property values to
                    override for X subplot.
   J0            =  (optional) override value of J0, if J ~= J0 or
                    if max(level_range) ~= J0.
   level_range   =  (optional) number or range of numbers indicating subset of
                    levels (j's) to plot.
   plotOpts      =  (optional) structure containing plot options.
   masterPlotFrame = (optional) structure containing coordinates to 
                     place X and W plots.
   xaxis_range   =  (optional) range of xaxis values to plot.
   scale_str     =  (optional) character cell array of strings containing
                    physcial scale values of levels to label left y-axis of W plot.

OUTPUTS

   hWplotAxes    =  (optional) handle to axes for MODWT coefficients (W) subplot.
   hXplotAxes    =  (optional) handle to axes for original data series (X) subplot.

SIDE EFFECTS

   1. If plotting VJ0t, without WJt (i.e. WJt = []), must specify a value for
      J0; otherwise error.
   2. If a level_range is specified, must provide a value for J0; otherwise
      error.
   3. Either WJt or VJ0t,  or both WJt and VJ0t may be specified'; otherwise
      error.

DESCRIPTION

   plot_modwt_coef plots the MODWT coefficients and optionally the original
   data series.  Either or both the MODWT wavelet and scaling coefficients
   may be plotted (aka Wplot).  The orignal time series is tagged the Xplot.
   The MODWT coefficients are circularly shifted at each level so as to 
   properly align the coefficients with the original data series.

   By default, the wavelet coefficients (WJt) and scaling coefficient at
   level J0 (VJ0t) are plotted.  A subrange of wavelet coefficient levels
   may be specified by via the parameter, level_range = [lower:upper]

   By default, the boundaries demarcing the circularly shifted MODWT
   coefficients influenced by the circularity conditions are plot.  
   Plotting of the boundaries may be toggled off.
  
   By default, the mean value of VJ0t is subtracted from VJ0t, so that
   when plotting a data series with large mean offsets, the VJ0t level
   does not dominate the Wplot.

   Defaults for plotOpts:
     plotOpts.PlotMODWTBoundary = 1;
     plotOpts.PlotWJt = 1;
     plotOpts.PlotVJ0t = 1;
     plotOpts.PlotX = 1;
     plotOpts.SubtractMeanVJ0t = 1;

EXAMPLE

    [WJt, VJ0t] = modwt(X, 'la8', 10, 'reflection');
    plot_modwt_coef(WJt, VJ0t, X, 'la8');

NOTES


BUGS

   1. MODWT Boundary lines do not draw across Y-axis range for values of VJ0t
   with large offsets (means).

REFERENCES

    See figure 183 of WMTSA.

SEE ALSO

   modwt, modwt_filter, overplot_modwt_cir_shift_coef_bdry,
   multi_yoffset_plot

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/01

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_modwt_clcwsvar

[top]

NAME

   plot_modwt_clcwsvar -- Plot the cumulative level of cumulative sample variance of MODWT wavelet coefficients.

 SYNOPSIS
   plot_modwt_clcwsvar(clcwsvar, [title_str], [xaxis], [xlabel_str])

INPUTS

   clcwsvar     =  cumulative level cumulative sample wavlet variance.
   title_str    =  (optional) character string containing title of plot.

OUTPUTS


SIDE EFFECTS


DESCRIPTION

EXAMPLE


NOTES


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/06/03

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_modwt_mra

[top]

NAME

   plot_imodwt_mra -- Plot the inverse MODWT multiresolution analysis detail and smooth coefficients and original time series.

 SYNOPSIS
   [hDplotAxes, hXplotAxes] = plot_imodwt_mra(DJt, SJ0t, [X], mra_att, ... 
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [MRAplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range])
   [hDplotAxes, hXplotAxes] = plot_imodwt_mra(DJt,   [], [X], mra_att, ... 
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [MRAplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range])
   [hDplotAxes, hXplotAxes] = plot_imodwt_mra( [], SJ0t, [X], mra_att, ... 
                                   [title_str], [xaxis], [xlabel_str], ...
                                   [MRAplotAxesProp], [XplotAxesProp], ...
                                   [J0], [level_range], [plotOpts], ...
                                   [masterPlotFrame], [xaxis_range])

INPUTS

   DJt           =  NxJ array of reconstituted detailed data series.
                    where N = number of time intervals,
                          J = number of levels
   SJO           =  Nx1 vector of reconstituted smoothed data series.
   X             =  (optional) vector of observations of size N.
   * mra_att        -- MODWT transform attributes (struct).
   title_str     =  (optional) character string or cell array of strings containing title of plot.
   xaxis         =  (optional) vector of values to use for plotting x-axis.
   xlabel_str    =  (optional) character string or cell array of strings containing label x-axis.
   WplotAxesProp =  (optional) structure containing axes property values to
                    override for W subplot.
   XplotAxesProp =  (optional) structure containing axes property values to
                    override for X subplot.
   J0            =  (optional) override value of J0, if J ~= J0 or
                    if max(level_range) ~= J0.
   level_range   =  (optional) number or range of numbers indicating subset of
                    levels (j's) to plot.
   plotOpts      =  (optional) structure containing plot options.
   masterPlotFrame = (optional) structure containing coordinates to 
                     place X and W plots.
   xaxis_range   =  (optional) range of xaxis values to plot.

OUTPUTS

   hMRAplotAxes  =  (optional) handle to axes for multiresolution analysis (MRA) subplot.
   hXplotAxes     =  (optional) handle to axes for original data series (X) subplot.

SIDE EFFECTS


DESCRIPTION

   plot_imodwt_mra plots the inverse MODWT detail and smowth coefficients
   and optionally the original data series.  Either or both the inverse
   MODWT detail and smooth coefficients may be plotted.  

   By default, the detail coefficients (DJt) and scaling coefficient at
   level J0 (SJ0t) are plotted.  A subrange of wavelet coefficient levels
   may be specified by via the parameter, level_range = [lower:upper]

EXAMPLE


NOTES


REFERENCES


SEE ALSO

   modwt, modwt_filter, overplot_modwt_cir_shift_coef_bdry,
   multi_yoffset_plot

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/01

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_filter_sgf

[top]

NAME

   plot_filter_sgf -- Plot squared gain functions for 
           specified transform, wavelet filter, levels and frequencies.

 SYNOPSIS
   [haxes, hlines] = plot_filter_sgf(transform, wtfname, nlevels, [f], [title_str]...
                                     [plotOpts])

INPUTS

   transform    =  transform (DWT or MODWT) to plot
   wtfname      =  character string or cell array of strings containing name(s)
                   of a supported (MO)DWT scaling filter.
   nlevels      =  maximum level of scale to plot.
   f            =  (optional) array of sinsuoidal frequencies
   figtitle_str = (optional) string contanining name of title of figure.
   plotOpts     = (optional) structure containing plotting options.

OUTPUTS

   haxes        = vector of handles to axes drawn.
   hlines       = vector of handles to lines drawn for equivalent filters.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/11/02

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_equivalent_filter

[top]

NAME

   plot_equivalent_filter -- Plot equivalent wavelet filters for J levels.

 SYNOPSIS
   [haxes, hlines_filter, hlines_acw, hlines_xaxis] = ...
     plot_equivalent_filter(transform, wavelet, J, ...
                            [LineSpec], [title_str], ...
                            [axesProp], [level_range], [plotOpts])

INPUTS

   transform    = name of wavelet transform (character string, case-insensitve)
   wavelet      = name of wavelet filter (character string, case-insensitve)
   J            = number of levels (integer > 0)
   LineSpec     = (optional) line specification for plotting.
   figtitle_str = (optional) title of figure (character string)
   axesProp     = (optional) axes properties to override (struct)
   level_range  = (optional) subset of levels (j's) to plot (numeric range)
   plotOpts     = (optional) additional plotting options (struct)

OUTPUTS

   haxes        = handles of axes drawn (vector)
   hlines_filter = handles of lines drawn for equivalent filters (vector)
   hlines_xaxis = handles to lines drawn for xaxis (vector)
   hlines_acw   = handles of lines drawn for autocorrelation widths (vector)

SIDE EFFECTS

   1. transform is a valid transform; otherwise error.
   2. wavelet is a valid wavelet filter; otherwise error.
   3. J > 0; otherwise error.

DESCRIPTION

   plot_equivalent_filter plots the equivalent wavelet and scaling filter
   coefficients for the specified wavelet filter, number of levels and
   wavelet transform.  The x-axis can be scaled to relative or absolute values
   of width of equivalent filter ( L_j). and while the y-axis can be
   scaled local or overall coefficent magnitudes using the the plotOpts argument.

   axesProp argument applies all subplot axes and can be used to override
   behaviour specified by the plotOpts argument.  Note: Each subplot is
   has the 'Tag' property set to h or g + level number and can be identified
   for call back to a particular subplot.
   
   Use level_range to display partial range of levels or reverse order of
   levels, e.g., level_range = [10:-1:5];

   Plotting options are controlled by setting fields in plotOpts structure 
   argument as follows:
      PlotgJ = plot scaling equivalent filter.  Default = 1 (yes).
      PlothJ = plot wavelet equivalent filter.  Default = 1 (yes).
      DrawXAxis = draw a line reprsenting x-axis at y = 0. Default = 1 (yes).
      DrawYTick = draw and label Y-Axis tick marks. Default = 0 (no).
      NormalizeXAxisToLj = set the limits of the X-Axis to relative scale of Lj
         at jth leve.  Default = 1 (yes).  If = 0, X-axis limits for all scales
         is set to the absolute scale of the equivalent width at Jth scale and 
         equivalent filters at all scales are shifted to properly align.
      NormalizeYAxisToAbs = set limits of Y-axis to absolute limits.
         The default = 0 (no)) plots each equivalent filter normalized to
         its min and max.  If set to 1 (yes), plot all equivalent filter to
         the absolute min and max value of all equivalent filters.
      PlotAutocorrelationWidth = plot the autocorrelation width of the 
         equivalent filter.  Default = 0 (no)
      EqualYAxisYLim = Plot Yaxis with equal - and + magnitued, ie.
                     = Set abs(YMin) = abs(YMax) 
                     = max(abs(YMin), abs(YMax)). Default = 1 (yes)
      PadXAxis = Extend x-axis limits by PadXAxis %  on each end
                 Default = 0 (no)
      PadYAxis = Extend y-axis limits by PadYAxis % on each end
                 Default = 0 (no)
      Stairs   = Plot filter as starirs. Default = 0, (no).

EXAMPLE

   plot_equivalent_filter('modwt', 'la8', 6, '', 1:4);

REFERENCES

   See figures 98a and 98b of WMTSA.

SEE ALSO

   dwt_equivalent_filter, modwt_equivalent_filter, LineSpec

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-02-12

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_dwt_vector

[top]

NAME

   plot_dwt_vector -- Plot the vector W of DWT coefficients.

 SYNOPSIS
   [haxes] = plot_dwt_vector(W, NJ)

INPUTS

   W            =  vector of DWT coefficents.
   NJ           =  (optional) vector of length J0+1 containing number of DWT 
                   wavelet (W) and scaling (VJ0) coefficients for each level.
   LineSpec     =  (optional) line specification for plotting.
   title_str    =  (optional) character string or cell array of strings containing title of plot.
   axesProp     =  (optional) structure containing name-value pairs of axes
                   properties to override.
   plotOpts     =  (optional) structure containing plotting options.

OUTPUTS

   haxes        =  handle to plot axes.
   hlineDWT     =  vector containing handles to line objects plotting DWT
                   (see stem function for details).
   hlineBdry    =  handle to line object plotting boundaries between DWT levels.

SIDE EFFECTS


DESCRIPTION

   plotOpts contains the following fields for controlling plotting:
     
     labelSubvectors = a Boolean controlling whether DWT coefficient subvectors
                       are labeled.
                       Default value:  1 = label subvectors.
     subvectorLabels = vector of numbers for labeling subectors.  
                       If vector element has value equal 0, that subvector is
                       is not labele.
                       Default:  All Wj and VJ0 subvectors are labeled.

EXAMPLE

   [W, NJ] = = dwt(X, 'la8', 6, 'periodic');
   N = length(W);
   axesProp.XLim = [0, N];
   [haxes, hlineDWT, hlineBdry] = plot_dwt_vector(W, NJ); 

WARNINGS


ERRORS


BUGS

  1. Only plots first channel.

REFERENCES


SEE ALSO

   dwt, LineSpec, axes, line, stem

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-01-08

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/plot_cum_wcov

[top]

NAME

   plot_cum_wcov -- Plot the cumlative wavelet covariance and (optionally) confidence intervals.

 SYNOPSIS
   plot_cum_wcov(wcov, [CI_wcov], [ylabel_str], [title_str])

INPUTS

   wcov         = vector containing wavelet covariance for J levels.
   CI_wcov      = Jx2 array containing 95% confidence interval of wcov,
                  lower bound (column 1) and upper bound (column 2)
   ylabel_str   = string containing first line of ylabel for plot
   title_str    = string containing title for the plot

OUTPUTS


SIDE EFFECTS


DESCRIPTION

EXAMPLE


NOTES


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/16

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] toolbox.subdirectory/parse_opts

[top]

NAME

   parse_opts_tcase -- munit test case to test parse_opts.

USAGE

   run_tcase('parse_opts_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for parse_opts testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   parse_opts

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-20

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/parse_opts

[top]

NAME

   parse_opts -- Parse name-value pair options into a struct.

 SYNOPSIS
   [opts] = parse_opts(varargin)

INPUTS

   * varargin   -- variable input argument list.

OUTPUTS

   * opts       -- struct of name-value pairs.

SIDE EFFECTS

   Function call requires a minimum of 2 input arguments; otherwise error.

DESCRIPTION

   parse_opts parses the input arguments for name-value pairs and returns the
   struct 'opts' filled with name-value pairs.

  Input arguments must be one of following:
  * (1) varargin list of name/value pairs, or
  * (2) a single argument of type struct with name/value pairs, or
  * (3) a single argument even-length vector of type cell with name/value pairs.

USAGE


WARNINGS


ERRORS


EXAMPLE

   % Example 1: Parse varargin 
   opts = parse_opts('a', 1, 'b', 'xyz', 'c', {'abc', 'def', 'jkl'});

   % Example 2: Parse a cell array
   opts_list = {'a', 1, 'b', 'xyz', 'c', {'abc', 'def', 'jkl'}};
    opts2 = parse_opts(opts_list);
  
   % Example 2: Parse a struct
    opt3 = parse_opts(opts);

NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-19

COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/overplot_modwt_cir_shift_coef_bdry

[top]

NAME

   overplot_modwt_cir_shift_coef_bdry -- Plot an overlay of the boundaries
   outside of which the shifted MODWT coefficients are influenced by circularity conditions.

 SYNOPSIS
   overplot_modwt_cir_shift_coef_bdry(hWplotAxes, WJt, VJ0t, att, ...
                                      [xaxis], [J0], [level_range], [lineProp])

INPUTS

   hWplotAxes   =  handle to axes for MODWT coefficients (W) subplot.
   WJt          =  NxJ array of MODWT wavelet coefficents
                   where N = number of time intervals,
                         J = number of levels
   VJ0t         =  Nx1 vector of MODWT scaling coefficients at level J0.
   * att        -- MODWT transform attributes (struct).
   xaxis        =  (optional) vector of values to use for plotting x-axis.
   J0           =  (optional) override value of J0, if J ~= J0 or
                     if max(level_range) ~= J0.
   level_range  =  (optional) number or range of numbers indicating subset of
                     levels (j's) to plot.
   lineProp     =  (optional) structure containing line property values to
                     override default line properties.

OUTPUTS


DESCRIPTION

   overplot_modwt_cir_shift_coef_bdry plots an overlay of the boundaries of the 
   circularly shifted MODWT coefficients influenced by the circularity
   condtions.  The overlay is plotted on the subplot specified by the handle
   to the hWplotAxes axes.

   The default values of the line objects drawn are:
      Color:      red
      LineWidth:  1
   The default values may be overridden via by specifying an attribute and value
   in the lineProp parameter, e.g. lineProp.Color = 'green';

EXAMPLE


NOTES


REFERENCES


SEE ALSO

   plot_modwt_coef, multi_yoffset_plot

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/overplot_imodwt_cir_mra_bdry

[top]

NAME

   overplot_imodwt_cir_mra_bdry -- Plot an overlay of the boundaries of 
               inverse MODWT MRA influenced by circularity conditions.

 SYNOPSIS
   overplot_imodwt_cir_mra_bdry(hMRAplotAxes, WJt, VJ0t, att, ...
                                [xaxis], [J0], [level_range], [lineProp])

INPUTS

   hMRAplotAxes  =  handle to axes for inverse MODWT MRA subplot.
   DJt           =  NxJ array of MODWT details
                    where N = number of time intervals,
                          J = number of levels
   SJ0t          =  Nx1 vector of MODWT smooth at level J0.
   * att        -- MODWT transform attributes (struct).
   xaxis         =  (optional) vector of values to use for plotting x-axis.
   J0            =  (optional) override value of J0, if J ~= J0 or
                      if max(level_range) ~= J0.
   level_range   =  (optional) number or range of numbers indicating subset of
                      levels (j's) to plot.
   lineProp      =  (optional) structure containing line property values to
                      override default line properties.

OUTPUTS


SIDE EFFECTS


DESCRIPTION

   The default values of the line objects drawn are:
      Color:      red
      LineWidth:  1
   The default values may be overridden via by specifying an attribute and value
   in the lineProp parameter, e.g. lineProp.Color = 'green';

 EXAMPLES

NOTES


BUGS


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/numsigdig_diff

[top]

NAME

 numsigdig_diff --  Find differences in two arrays exceedning number of significant digits.

USAGE

   result = numsigdig_diff(a, b, [numsigdig], [mode])

INPUTS

   * x           -- array or vector of values
   * y           -- second array or vector of values
   * numsigdig   -- (optional) number of significant digits threshold
                    Valid values:  >= 0
                    Default: 0
   * mode        -- (optional) format of returned result
                    Valid Values:  'details', 'summary'
                    Default:  'details'

OUTPUT

   * result      -- array or number containing the result of comparison.

DESCRIPTION

   numsigdig_diff compares two arrays and allows approximate equality when strict
   equality may not exist due to minor differences due to rounding errors.  
   numsigdig_diff subtracts two arrays and identifies those elements whose 
   differences exceed the given number of significant digits.

   The function has 2 modes of operation:
      details   = return an array of size(a) with elements 
                   = 0,   for differences between a and b <  number of significant digits
                   = a-b, for differences between a and b >= number of significant digits
      summary   = return a number whose values 
                   = 0, for no differences >  number of significant digits
                   > 0, number of elements >= number of significant digits.

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-07-13   

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/nsigdig_diff

[top]

NAME

 nsigdig_diff --  Find differences in two arrays exceedning number of significant digits.

USAGE

   result = nsigdig_diff(a, b, [nsdig], [mode])

INPUTS

   a                = first array or vector of values
   b                = second array or vector of values
   nsdig            = (optional) number of significant digits threshold
                      Valid values:  >= 0
                      Default: 0
   mode             = (optional) format of returned result
                      Valid Values:  'details', 'summary'
                      Default:  'details'

OUTPUT

   result           = array or number containing the result of comparison.

DESCRIPTION

   nsigdig_diff compares two arrays and allows approximate equality when strict
   equality may not exist due to minor differences due to rounding errors.  
   nsigdig_diff subtracts two arrays and identifies those elements whose 
   differences exceed the given number of significant digits.

   The function has 2 modes of operation:
      details   = return an array of size(a) with elements 
                   = 0,   for differences between a and b <  number of significant digits
                   = a-b, for differences between a and b >= number of significant digits
      summary   = return a number whose values 
                   = 0, for no differences >  number of significant digits
                   > 0, number of elements >= number of significant digits.

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-07-13   

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/nargerr_tcase

[top]

NAME

   nargerr_tcase -- munit test case to test nargerr.

USAGE

   run_tcase(@nargerr_tcase)

INPUTS


OUTPUTS

   tc            = tcase structure for nargerr testcase.

SIDE EFFECTS


DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-27

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/nargerr

[top]

NAME

    nargerr -- Check number of arguments to a function.

 SYNOPSIS
   [errmsg] = nargerr(func, numargin, argin, numargout, argout, [mode], [msg])
   [errmsg] = nargerr(func, numargin, argin, numargout, argout, [mode], [msg], 'string')
   [errstruct] = nargerr(func, numargin, argin, numargout, argout, [mode], [msg], 'struct')

INPUTS

   * func          -- name of checked function (string or function handle).
   * numargin      -- number of input arguments passed during function call (integer).
   * exp_numargin  -- expected number of input arguments.
                      (integer or range of integers).
   * numargout     -- number of output arguments passed during function call (integer).
   * exp_numargout -- expected number of output arguments.
                      (integer or range of integers).
   * mode          -- (optional) output display mode (integer).
                        0 = silent
                        1 = verbose (default).
   * msg           -- (optional) message string to be displayed (string).
   * return_type   -- (optional) type of output argument (string).
                       'string' = return error message string (default).
                       'struct' = return error message struct.

OUTPUTS

   * errmsg        -- error message (string).
   * errstruct     -- error struct with fields:  message, identifier.

SIDE EFFECTS

   Function call requires a minimum of 5 input arguments; otherwise error.

DESCRIPTION

   nargerr checks whether the number of input and output arguments of a function
   call each are within the valid range. If the number of input (numargin) or 
   output (numargout) arguments are not within range of expected values for input 
   (exp_numargin) or output (exp_numargout) arguments, respectively, the 
   function returns an error message string or error message struct.

   The 'exp_numarg' arguments may be specified as a(n):
   * integer
   * range of integers
   * string expression for range of integers
   For range intergers, e.g. [1:3], the value of 0 may be used
   for the lower bound and Inf for the upper bound to specify
   no lower or upper limit, respectively.
   The string expression option also allows specification of no 
   lower or upper bounds, e.g.
     '2:'  -- A minimum of two arguments and no upper bound.
     ':2'  -- A maximum of two arguments.

   'mode' controls whether information is displayed to the command window.

   'msg' is an message to be displayed to the command window, if nonempty
   and regardless of the value of 'mode'.  This allows a user-defined customized
   message for display.
   
   'return_type' specifies the format of the output argument:
      'string' -- output is an error message (errmsg).
      'struct' -- output is a struct (errstruct) with fields message and identifier.
    The 'struct' option may be used in with the error function to throw an
    error.  In this example,

       error(nargerr('myfunction', 2, 1, 2, 0, '', '', 'struct'))

    the number of input and output arguments are outside the expected range.
    The nargerr function returns an error struct, which in turn causes the 
    error function to throw an error.

ERRORS

   WMTSA:nargerr:invalidInputArgumentValue
   WMTSA:nargerr:incorrectStringFormat
   MATLAB:nargchk:notEnoughInputs     (thrown by nargchk)
   MATLAB:nargchk:tooManyInputs       (thrown by nargchk)
   MATLAB:nargoutchk:notEnoughOutputs (thrown by nargchk)
   MATLAB:nargoutchk:tooManyOutputs   (thrown by nargchk)

EXAMPLE

   % Default execution.
   [errmsg] = nargerr(mfilename, nargin, [1:3], nargout, [0:2]);

   % No display to command window.
   [errmsg] = nargerr(mfilename, nargin, [1:3], nargout, [0:2], 0);

   % Display optional msg to command window.
   msg = 'Usage: myfuction a b c [d]';
   [errmsg] = nargerr(mfilename, nargin, [1:3], nargout, [0:2], 0, msg);

   % Use strings to specify range of integers with ':' syntax
   [err, errmsg] = nargerr(mfilename, nargin, ':3', nargout, '');

   % Throw an error if one found.
   error(nargerr(mfilename, 2, 1, 2, 0, '', '', 'struct'))

NOTES

   1. This function requires MATLAB 7, which allows error structures as input
      to the error function.
   2. To skip number of argument checking for input or output arguments, specify
      exp_numargin or exp_numargout, respectively, as empty vectors ([]) 
      or empty strings ('').

SEE ALSO

   nargchk, nargoutchk, errargn

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-06-22

COPYRIGHT

   (c) 2003, 2004, 2005 Charles R. Cornish

CREDITS

   nargerr was inspired by the errargn function
   by M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi
   which is part of the MATLAB wavelet toolkit.

 MATLAB VERSION
   7.0

REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/multi_yoffset_plot

[top]

NAME

   multi_yoffset_plot -- Plot series of stacked plots of multiple data series.

 SYNOPSIS
   [haxis] = multi_yoffset_plot(x, y, [ylabel_str], [axesProp], [left_ylabel_str])

INPUTS

   x            = vector of length nrow containing values to plot in x-dimension.
   y            = nrow x ncol matrix of ncol sets of y-values to offset plot
   ylabel_str   = (optional) cell array of length nrow containing character 
                  strings for labeling y values.
   axesProp     = structure containing property values for customizing plot axes.

OUTPUTS

   haxes        = handle to the plot axes.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


REFERENCES


SEE ALSO

   plot_modwt_coef

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/08

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwtjm

[top]

NAME

   modwtjm -- Calculate jth level MODWT coefficients (MATLAB implementation).

 SYNOPSIS
   [Wtout, Vtout] = modwtjm(Vtin, ht, gt, j)

INPUTS

   * Vtin        -- Input series for j-1 level (i.e. MODWT scaling coefficients) 
   * ht          -- MODWT wavelet filter coefficients.
   * gt          -- MODWT scaling filter coefficients.
   * j           -- level (index) of scale.

OUTPUTS

   * Wtout       -- MODWT wavelet coefficients for jth scale.
   * Vtout       -- MODWT scaling coefficients for jth scale.

SIDE EFFECTS


DESCRIPTION

   modwtjm is an implementation in MATLAB code of the MODWT transform for 
   the jth level, and is included in the toolkit for illustrative purposes 
   to demonstrate the pyramid algothrim.

   For speed considerations, the modwt function uses the C implementation of 
   the MODWT transform, modwtj, which linked in as a MEX function.

EXAMPLE

   X = wmtsa_data('ecg');
   wtf = modwt_filter('la8');
   % Compute the j = 1 level coefficients for ECG time series.
   j = 1;
   [Wtout, Vtout] = modwtjm(X, wft.h, wtf.g, j);

WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM

   See page 177-178 of WMTSA for pyramid algorithm.

REFERENCES


SEE ALSO

   modwtj, modwt, modwt_filter

 TOOLBOX
   wmtsa

 CATEGORY
   dwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-01-12

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwtj

[top]

NAME

   modwtj -- Compute MODWT coefficients for jth level.

USAGE

   [Wt_j, Vout] = modwtj(Vin, ht, gt, j);

INPUTS

   Vin             - Initial time series, or scaling coefficients for j-1 level.
   ht              - MODWT avelet filter coefficients.
   gt              - MODWT Scaling filter coefficients.
   j               - Level of decomposition.

OUTPUTS

   Wt_j            - MODWT wavelet coefficients for jth level.
   Vout            - MODWT scaling coefficients (residuals) for jth level.

DESCRIPTION

   modwtj is a Mex-Function written in C, which implements the Pyramid Alogrithm
   of the MODWT for the jth level.  It is usually used as an internal function
   called by modwt.

   To compile, type:  mex modwtj.c

EXAMPLE

   [Wt_j, Vout] = modwtj(Vin, ht, gt, j);

ALGORITHM

   See pages 177-178 of WMTSA for description of Pyramid Algorithm for
   the MODWT.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-05-01

COPYRIGHT


CREDITS

   Based on the original function (modwt.c) by Brandon Whitcher.

REVISION

   $Revision: 612 $

[Functions] Test:WVAR:MODWT/modwt_wvar_verification_tcase

[top]

NAME

   modwt_wvar_verification_tcase -- munit test case to test modwt_wvar.

USAGE

   run_tcase('modwt_wvar_verification_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_wvar_verification testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_wvar

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmsta.Tests.dwt/modwt_wvar_psd_tcase

[top]

NAME

   modwt_wvar_psd_tcase -- munit test case to test modwt_wvar_psd.

USAGE

   run_tcase('modwt_wvar_psd_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_wvar_functionality testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_psd

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-07-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wvar_psd

[top]

NAME

   modwt_wvar_psd -- Calculate estimate of band-averaged power spectral density
                     from MODWT wavelet variance.

 SYNOPSIS
   [CJ, f, CI_CJ, f_band] = modwt_wvar_psd(wvar, delta_t, [CI_wav])

INPUTS

   wvar         = wavelet variance (Jx1 vector).
   delta_t      = sampling interval of original time series.
   CI_wvar      = confidence interval of wavelet variance (Jx2 array).
                  lower bound (column 1) and upper bound (column 2).

OUTPUTS

   CJ           = estimate of average of power spectral density per octave band.
                  (Jx1 vector)
   f            = center frequency (geometric mean) of octave band.
                  (Jx1 vector)
   CI_CJ        = confidence interval of power spectral density estimate (Jx2 array)
                  lower bound (column 1) and upper bound (column 2).
   f_band       = lower and upper bounds of frequency octave band.
                  (Jx2 vector)

SIDE EFFECTS


DESCRIPTION

   modwt_wvar_psd calculates an estimate of the average spectral density
   function from the MODWT wavelet variance.  

   CJ, f, CI_CJ, and f_band are ordered by increasing level j and scale tau,
   and hence decreasing frequency f.  This is in the typical order of PSD
   estimates by increasing frequency f.  The reverse order of CJ by increasing
   level j allows the ready comparision of CJ decomposed to different partial
   levels J0.

EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM

   C_j = 2^j * wvar(j) * delta_t, for j = 1:J0
  
   See page 316 of WMTSA for further details.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   loglog_modwt_psd, modwt_wvar, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-11-09

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] Test:WVAR:MODWT/modwt_wvar_functionality_tcase

[top]

NAME

   modwt_wvar_functionality_tcase -- munit test case to test modwt_wvar.

USAGE

   run_tcase('modwt_wvar_functionality_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_wvar_functionality testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_wvar

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/modwt_wvar_ci_verification_tcase

[top]

NAME

   modwt_wvar_ci_verification_tcase -- munit test case to test modwt_wvar.

USAGE

   run_tcase('modwt_wvar_ci_verification_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_wvar_ci_verification testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_wvar_ci

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Test.dwt/modwt_wvar_ci_functionality_tcase

[top]

NAME

   modwt_wvar_ci_functionality_tcase -- munit test case to test modwt_wvar_ci.

USAGE

   run_tcase('modwt_wvar_ci_functionality_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_wvar_ci_functionality testcase.

SIDE EFFECTS


DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wvar_ci

[top]

USAGE

   [CI_wvar, edof, Qeta] = modwt_wvar_ci(wvar, MJ, [ci_method],
                                         [WJt], [lbound], [ubound], [p])

INPUTS

   wvar         = wavelet variance (1xJ vector).
   MJ          = number of coefficients used calculate the wavelet variance at
                  each level (Jx1).
   ci_method    = (optional) method for calculating confidence interval
                  valid values:  'gaussian', 'chi2eta1', 'chi2eta3'
                  default: 'chi2eta3'
   WJt          = MODWT wavelet coefficients (NxJ array).
                  where N = number of time intervals
                        J = number of levels
                  required for 'gaussian' and 'chi2eta1' methods.
   lbound       = lower bound of range of WJt for calculating ACVS for each
                  level (Jx1 vector).
   ubound       = upper bound of range of WJt for calculating ACVS for each
                  level (Jx1 vector).
   p            = (optional) percentage point for chi2square distribution.
                  default: 0.025 ==> 95% confidence interval

OUTPUTS

   CI_wvar      = confidence interval of wavelet variance  (Jx2 array).
                  lower bound (column 1) and upper bound (column 2).
   edof         = equivalent degrees of freedom (Jx1 vector).
   Qeta         = p x 100% percentage point of chi-square(eta) distribution (Jx2 array).
                  lower bound (column 1) and upper bound (column 2).
   AJ           = integral of squared SDF for WJt (Jx1 vector).

SIDE EFFECTS


DESCRIPTION

   MJ is vector containing the number of coefficients used to calculate the 
   wavelet variance at each level. 
   For the unbiased estimator, MJ = MJ for j=1:J0, where MJ is the number 
   of nonboundary MODWT coefficients at each level.
   For the biased estimator, MJ = N for all levels.
   For the weaklybiased estimator, MJ = MJ(Haar), for j=1:J0, where MJ(Haar) 
   is the number of nonboundary MODWT coefficients for Haar filter at each level.

EXAMPLE


ERRORS

   WMTSA:InvalidNumArguments
   WMTSA:WVAR:InvalidCIMethod

NOTES

   The output argument edof (equivalent degrees of freedom) is returned for
   the chi2 confidence interval methods.  For the gaussian method, a null
   value is returned for edof.

ALGORITHM

   See section 8.4 of WMTSA on pages 311-315.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   wmtsa_acvs

 TOOLBOX
   wmtsa/wmtsa

 CATEGORY
   ANOVA:WVAR:MODWT

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-04-23

CREDITS


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wvar

[top]

INPUTS

   WJt          = MODWT wavelet coefficients (NxJ array).
                  where N = number of time intervals
                        J = number of levels
   ci_method    = (optional) method for calculating confidence interval
                  valid values:  'gaussian', 'chi2eta1', 'chi2eta3'
                  default: 'chi2eta3'
   estimator    = (optional) type of estimator
                  valid values:  'biased', 'unbiased', 'weaklybiased'
                  default: 'biased'
   wtfname      = (optional) name of wavelet filter (string, case-insensitive).
                   required for 'biased' and 'weaklybiased' estimators.
   p            = (optional) percentage point for chi2square distribution.
                  default: 0.025 ==> 95% confidence interval
   w_att

OUTPUTS

   wvar         = wavelet variance (Jx1 vector).
   CI_wvar      = confidence interval of wavelet variance (Jx2 array).
                  lower bound (column 1) and upper bound (column 2).
   edof         = equivalent degrees of freedom (Jx1 vector).
   MJ           = number of coefficients used calculate the wavelet variance at
                  each level (integer).
   wvar_att     = structure containing MODWT wavelet variance attributes

SIDE EFFECTS


DESCRIPTION


EXAMPLE


ERRORS

   WMTSA:InvalidNumArguments
   WMTSA:WVAR:InvalidCIMethod
   WMTSA:WVAR:InvalidEstimator
   WMTSA:WaveletArgumentRequired

NOTES

   MJ is vector containing the number of coefficients used to calculate the 
   wavelet variance at each level. 
   For the unbiased estimator, MJ = MJ for j=1:J0, where MJ is the number 
   of nonboundary MODWT coefficients at each level.
   For the biased estimator, MJ = N for all levels.
   For the weaklybiased estimator, MJ = MJ(Haar), for j=1:J0, where MJ(Haar) 
   is the number of nonboundary MODWT coefficients for Haar filter at each level.

ALGORITHM

   See section 8.3 of WMTSA on page 306.
   For unbiased estimator of wavelet variance, see equation 306b. 
   For biased estimator of wavelet variance, see equation 306c. 

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_wvar_ci

 TOOLBOX
   wmtsa/wmtsa

 CATEGORY
   ANOVA:WVAR:MODWT

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-04-23

CREDITS

   Based on original function wave_var.m by Brandon Whitcher.

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/modwt_wcov_functionality_tcase

[top]

NAME

   modwt_wcov_functionality_tcase -- munit test case to test modwt_wcov.

USAGE

   run_tcase('modwt_wcov_functionality_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_wcov_functionality testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_wcov

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wcov

[top]

NAME

   modwt_wcov -- Calculate the wavelet covariance of two sets of MODWT
                 wavelet coefficients.

 SYNOPSIS
   [wcov, CI_wcov, VARwcov] = modwt_wcov(WJtX, WJtY, [ci_method], [estimator],
                                          [wtfname], [p])

INPUTS

   WJtX         = MODWT wavelet coefficients for X series (NxJ array).
                  where N  = number of time intervals,
                        J = number of levels.
   WJtY         = MODWT wavelet coefficients for Y series (NxJ array).
   ci_method    = (optional) method for calculating confidence interval
                  valid values:  'gaussian', 'none'
                  default: 'gaussian'
   estimator    = (optional) type of estimator
                  valid values:  'biased', 'unbiased', 'weaklybiased'
                  default: 'biased'
   wtfname      = (optional) name of wavelet filter (string, case-insensitive).
                   required for 'biased' and 'weaklybiased' estimators.
   p            = (optional) percentage point for confidence interval.
                  default: 0.025 ==> 95% confidence interval

OUTPUTS

   wcov         = wavelet covariance (Jx1 vector).
   CI_wcov      = confidence interval of wavelet covariance (Jx2 array).
                  lower bound (column 1) and upper bound (column 2).
   VARwcov      = variance of wcov (Jx1 vector).
   NJt          = number of coefficients used calculate the wavelet variance at
                  each level (integer).

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


BUGS

  1. This function has not been modified for multivariate datasets.

ALGORITHM


REFERENCES

   Whitcher, B., P. Guttorp and D. B. Percival (2000)
      Wavelet Analysis of Covariance with Application to Atmospheric Time
      Series, \emph{Journal of Geophysical Research}, \bold{105}, No. D11,
      14,941-14,962.

SEE ALSO

   modwt

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-04-23

 Credits:
   Based on original function wave_cov.m by Brandon Whitcher.

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wcor

[top]

NAME

   modwt_wcor -- Calculate the wavelet correlation of two sets of MODWT
                 wavelet coefficients.

 SYNOPSIS
   [wcor, CI_wcor] = modwt_wcor(WJtX, WJtY, [p])

INPUTS

   WJtX         - NxJ array containing MODWT-computed wavelet coefficients
                  for X dataset
                  where N  = number of time intervals,
                        J = number of levels.
   WJtY         - NxJ matrix containing MODWT-computed wavelet coefficients
                  for Y dataset.
   p            - (optional) percentage point for confidence interval.
                  default: 0.025 ==> 95% confidence interval

OUTPUTS

   wcor         - Jx1 vector containing wavelet correlations.
   CI_wcor      - Jx2 array containing confidence interval of wcor,
                  lower bound (column 1) and upper bound (column 2).

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM


REFERENCES

   Whitcher, B., P. Guttorp and D. B. Percival (2000)
      Wavelet Analysis of Covariance with Application to Atmospheric Time
      Series, \emph{Journal of Geophysical Research}, \bold{105}, No. D11,
      14,941-14,962.

SEE ALSO

   modwt

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-04-23

 Credits:
   Based on original function wave_cov.m by Brandon Whitcher.

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wavelet_transfer_function

[top]

NAME

   modwt_wavelet_transfer_function -- Calculate transfer function for
     frequencies f for specified MODWT wavelet filter and (optionally) jth level.

 SYNOPSIS
   Ht_j = modwt_wavelet_transfer_function(f, wtfname, [j])

INPUTS

   f            - vector of sinsuoidal frequency.
   wtfname      - name of a WMSTA-supported MODWT scaling filter.
   j            - (optional) level (index) of scale.

OUTPUTS

   Ht           - vector of the transfer function values for MODWT wavelet filter h
                  at frequencies f.
   Ht_j         - vector of the transfer function values for MODWT wavelet filter h
                  at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 163 of WMTSA for Ht.
   See page 169 of WMTSA for Ht_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_wavelet_sgf

[top]

NAME

   modwt_wavelet_sgf -- Calculate squared gain function for
     specified MODWT scaling filter at frequencies f and at (optionally) jth level.

 SYNOPSIS
   Hst   = modwt_wavelet_sgf(f, wtfname)
   Hst_j = modwt_wavelet_sgf(f, wtfname, j)

INPUTS

   f            = vector of sinsuoidal frequency.
   wtfname      = name of a WMSTA-supported MODWT scaling filter.
   j            = (optional) level (index) of scale.

OUTPUTS

   Hst          = vector of squared gain function values for MODWT wavelet
                  filter h at frequencies f.
   Hst_j        = vector of squared gain function values for MODWT wavelet
                  filter h at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 163 of WMTSA for Hst.
   See page 202 of WMTSA for Hst_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_wavelet_transfer_function

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/modwt_verification_tcase

[top]

NAME

   modwt_verification_tcase -- munit test case to verify results of modwt transform.

USAGE

   run_tcase('modwt_verification_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt testcase.

DESCRIPTION


SEE ALSO

   modwt_wvar

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.wmtsa.Test/fmodwt_utils_tsuite.m

[top]

NAME

   modwt_utils_tsuite -- munit test suite to test modwt_utils.

USAGE

    run_tsuite('modwt_utils_tsuite')

INPUTS


OUTPUTS

   ts            = tsuite structure for modwt_utils testsuite.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-29

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.wmtsa.Test/modwt_tsuite.m

[top]

NAME

    modwt_tsuite -- munit test suite to test modwt and inverse transforms.

USAGE

    run_tsuite('modwt_tsuite')

INPUTS


OUTPUTS

   ts            = tsuite structure for modwt transform testsuite.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-04-30

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_scaling_transfer_function

[top]

NAME

   modwt_scaling_transfer_function -- Calculate transfer function for
     frequencies f for specified MODWT scaling filter and (optionally) jth level.

 SYNOPSIS
   Gt_j = modwt_scaling_transfer_function(f, wtfnamne, [j])

INPUTS

   f            - vector of sinsuoidal frequency.
   wtfnamne      - name of a WMSTA-supported MODWT scaling filter.
   j            - (optional) level (index) of scale.

OUTPUTS

   G            - vector of the transfer function values for MODWT scaling filter ht
                  at frequencies f.
   G_j          - vector of the transfer function values for MODWT scaling filter ht
                  at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 163 of WMTSA for Gt.
   See page 169 of WMTSA for Gt_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_scaling_sgf

[top]

NAME

   modwt_scaling_sgf -- Calculate squared gain function for
     frequencies f for specified MODWT scaling filter and (optionally) jth level.

 SYNOPSIS
   Gst_j = modwt_scaling_sgf(f, wtfname, [j])

INPUTS

   f            = vector of sinsuoidal frequency.
   wtfname      = name of a WMSTA-supported MODWT scaling filter.
   j            = (optional) level (index) of scale.

OUTPUTS

   Gst          = vector of squared gain function values for MODWT scaling filter h
                  at frequencies f.
   Gst_j        = vector of squared gain function values for MODWT scaling filter h
                  at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 163 of WMTSA for Gst.
   See page 202 of WMTSA for Gst_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_scaling_transfer_function

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_running_wvar

[top]

USAGE

   [rwvar, CI_rwvar] = modwt_running_wvar(TWJt, [range], [step], [span], ...
                                     [ci_method], [estimator], [wtfname], [p])

INPUTS

   TWJt         = NxJ array of circularly shifted (advanced) MODWT 
                  wavelet coefficents
   range        = (optional) vector containing range of indices of
                  translated wavelet coefficients over which to
                  calculate wavelet variance.
                  Default value: entire range = [1+span/2, N-span/2]
   step         = (optional) increment at which to calculate wavelet
                  variances.
                  Default value: 1
                  If = -1, use explicit indices passed by range.
   span         = (optional) number of points in running segment 
                  over which to calculate wavelet variance.
                  Default value: 2^J0
   ci_method    = (optional) method for calculating confidence interval
                  valid values:  'gaussian', 'chi2eta1', 'chi2eta3'
                  Default value: 'chi2eta3'
   estimator    = (optional) type of estimator
                  valid values:  'biased', 'unbiased'
                  Default value: 'biased'
   wtfname      = (optional) string containing name of a WMTSA-supported 
                  MODWT wavelet filter.
   p            = (optional) percentage point for chi2square distribute
                  Default value: 0.025 ==> 95% confidence interval

OUTPUTS

   rwvar        = N_rm x J array containing running wavelet variances, 
                  where N_rm is number of runnning means.
   CI_rwvar     = N_rm x J x 2 array containing confidence intervals of
                  running wavelet variances with lower bound (column 1) 
                  and upper bound (column 2).
   indices      = Indices of time points in original data series for which
                  rwvar values are calculated.

SIDE EFFECTS


DESCRIPTION

   Function calculates the running wavelet variance from the translated
   (circularly shifted) MODWT wavelet coefficients.  User may specify
   the range and steps of time points to over which to calculate wavelet
   variances and number of continguous values (span) to calculate each
   variance.  The running variance is computed for a span of values
   center at the particular time point.

EXAMPLE

   [WJt,  VJ0t]      = modwt(X, 'la8', 9)
   [TWJt, TVJ0t]     = modwt_cir_shift(WJt, VJ0t)
   [rwvar, CI_rwvar] = modwt_running_wvar(TWJt)

WARNINGS


ERRORS


NOTES

   1.  User must use circularly shift MODWT wavelet coefficients.
       Use modwt_cir_shift prior to calculating running wavelet variances.
   2.  The biased estimator (default option) should be used.

BUGS


TODO


ALGORITHM


REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_wvar, modwt_cir_shift

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-11-10

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_running_wcov

[top]

NAME

   modwt_running_wcov -- Calculate running wavelet covariance of translated 
       (circularly shifted) MODWT wavelet coefficients.

 SYNOPSIS
   [rwcov, CI_rwcov] = modwt_running_wcov(TWJtX, TWJtY, [range], [step], [span], [p])

INPUTS

   TWJtX        - NxJ array of circularly shifted (translated) MODWT 
                  wavelet coefficents for X data series.
   TWJtY        - NxJ array of circularly shifted (translated) MODWT 
                  wavelet coefficents for Y data series.
   range        - (optional) vector containing range of indices of
                  translated wavelet coefficients over which to
                  calculate wavelet variance.
                  Default value: entire range = [1+span/2, N-span/2]
   step         - (optional) increment at which to calculate wavelet
                  variances.
                  Default value: 1
   span         - (optional) running segment over which to calculate
                  wavelet variance.
                  Default value: 2^J0
   p            - (optional) percentage point for chi2square distribute
                  Default value: 0.025 ==> 95% confidence interval

OUTPUTS

   rwcov        - N_rm x J array containing running wavelet covariances, 
                  where N_rm is number of runnning means.
   CI_rwcov     - N_rm x J x 2 array containing confidence intervals of
                  running wavelet covariances with lower bound (column 1) 
                  and upper bound (column 2).

SIDE EFFECTS


DESCRIPTION

   Function calculates the running wavelet covariance from the translated
   (circularly shifted) MODWT wavelet coefficients.  User may specify
   the range and steps of time points to over which to calculate wavelet
   variances and number of continguous values (span) to calculate each
   variance.  The running variance is computed for a span of values
   center at the particular time point.

EXAMPLE

   [WJtX,  VJ0tX]      = modwt(X, 'la8', 9)
   [WJtY,  VJ0tY]      = modwt(Y, 'la8', 9)
   [TWJtX, TVJ0tX]     = modwt_cir_shift(WJtX, VJ0tX)
   [TWJtY, TVJ0tY]     = modwt_cir_shift(WJtY, VJ0tY)
   [rwcov, CI_rwcov] = modwt_running_wcov(TWJtX, TWJtY)

WARNINGS


ERRORS


NOTES

   1.  User must use circularly shift MODWT wavelet coefficients.
       Use modwt_cir_shift prior to calculating running wavelet variances.
   2.  The biased estimator (default option) should be used.

BUGS


TODO


ALGORITHM


REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_wcov, modwt_cir_shift

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-11-10

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_rot_cum_wav_svar

[top]

NAME

   modwt_rot_cum_wsvar -- Calculate the rotated wavelet sample variance of
         MODWT wavelet coefficients.

 SYNOPSIS
   [rcwsvar] = modwt_rot_cum_wav_svar(WJ, wtfname)

INPUTS

   WJt          - NxJ array of MODWT wavelet coefficents
                  where N = number of time intervals
                        J = number of levels
   wtfname      - string containing name of a WMTSA-supported MODWT 
                  wavelet filter.

OUTPUTS

   rcwsvar      - NxJ containing rotated cumulative sample variance of
                  the MODWT wavelet coefficients

SIDE EFFECTS

   1.  wtfname is a supported wavelet, otherwise error.

DESCRIPTION


EXAMPLE


ALGORITHM


REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_cum_wav_svar, modwt_cir_shift, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-16

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_num_nonboundary_coef

[top]

NAME

   modwt_num_nonboundary_coef -- Calculate number of nonboundary MODWT coefficients for jth level.

USAGE

   MJ = modwt_num_nonboundary_coef(wtfname, N, j)

INPUTS

   * wtfname    -- name of wavelet transform filter (string).
   * N          -- number of samples (integer).
   * j          -- jth level (index) of scale or range of j levels.
                   (integer or vector of integers).

OUTPUTS

   * MJ         -- number of nonboundary MODWT coefficients for specified
                   levels (integer or Jx1 vector of integers).

SIDE EFFECTS


DESCRIPTION

   N-Lj+1 can become negative for large j, so set MJ = min(MJ, 0).

EXAMPLE


NOTES


ALGORITHM

   M_j = N - Lj + 1

   see page 306 of WMTSA for definition.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University _roPress.

SEE ALSO

   modwt_filter, equivalent_filter_width

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa/wmtas/Test/modwt_mra_verification_tcase.m

[top]

NAME

   modwt_mra_verification_tcase -- munit test case to verify results of modwt_mra transform.

USAGE

   run_tcase('modwt_mra_verification_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_mra testcase.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/modwt_mra_functionality_tcase

[top]

NAME

   modwt_mra_functionality_tcase -- munit test case to test modwt_mra functionality.

USAGE

   run_tcase('modwt_mra_functionality_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_mra testcase.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_mra.m

[top]

NAME

   modwt_mra -- Calculate MODWT multi-resolution details and smooths of a time
                series (direct method).

 SYNOPSIS
   [DJt, SJt, mra_att] = modwt(X, wtfname, nlevels, boundary)

INPUTS

   * X          -- set of observations 
                   (vector of length N or matrix of size N x Nchan)
   * wtf        -- (optional) wavelet transform filter name or struct 
                   (string, case-insensitve or wtf struct).
                   Default:  'la8'
   * nlevels    -- (optional) maximum level J0 (integer) 
                   or method of calculating J0 (string).
                   Valid values: integer>0 or a valid method name
                   Default:  'conservative'
   * boundary   -- (optional) boundary conditions to use (string)
                   Valid values: 'circular' or 'reflection'
                   Default: 'reflection'
   * opts       -- (optional) Additional function options.

OUTPUT

   * DJt        -- MODWT details coefficents (N x J x NChan array).
   * SJt        -- MODWT smooth coefficients (N x {1,J} x NChan vector).
   * mra_att    -- structure containing IMODWT MRA transform attributes

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported MODWT wavelet filter; otherwise error.
   2.  nlevels is an integer > 0, or is a string containing valid method for
       choosing J0; otherwise error.

DESCRIPTION

   modwt_mra calculates the MODWT MRA detail and smooth coefficients
   from a set of observations in a single function call.

    The output parameter att is a structure with the following fields:
       name      - name of transform (= 'MODWT')
       wtfname   - name of MODWT wavelet filter
       npts      - number of observations (= length(X))
       J0        - number of levels 
       boundary  - boundary conditions

EXAMPLE


NOTES


ALGORITHM

   See pages 177-179 of WMTSA for description of Pyramid Algorithm for
   the inverse MODWT multi-resolution analysis.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   imodwt_mra, imodwt_details, imodwt_smooth, imodwtj, modwt, modwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-04-29

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_inv_cir_shift

[top]

NAME

   modwt_inv_cir_shift --  Inverse circularly shift (advance) MODWT coefficients.

 SYNOPSIS

INPUTS

   TWJt         -  NxJ array of circularly-shifted MODWT wavelet coefficents.
                   where N = number of time intervals.
                         J = number of levels.
   TVJ0t        -  Nx1 vector of circularly-shifted MODWT scaling
                   coefficients at level J0.
   wtfname      -  name of a supported WMSTA wavelet filter.
   J0           -  largest or partial level of MODWT.

OUTPUTS

   WJt          -  NxJ array of MODWT wavelet coefficents.
   VJ0t         -  Nx1 vector of MODWT scaling coefficients at level J0.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES

   If WJ is not supplied, user must supply value of J0.

ALGORITHM

   See pages 114-115 equation 114b of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

  advance_scaling_filter, advance_wavelet_filter,
  advance_time_series_filter, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/modwt_functionality_tcase

[top]

NAME

   modwt_functionality_tcase -- munit test case to test modwt functionality.

USAGE

   run_tcase('modwt_functionality_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt testcase.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] Tests.dwt/modwt_filter_tcase

[top]

NAME

   modwt_filter_tcase -- munit test case to test modwt_filter.

USAGE

   run_tcase('modwt_filter_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_filter testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-30

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_filter

[top]

NAME

   modwt_filter -- Define the MODWT filter coefficients.

 SYNOPSIS
  [wtf] = modwt_filter(wtfname)

INPUTS

   * wtfname    -- name of wavelet transform filter (string, case-insenstive).

OUTPUTS

   * wtf        -- wavelet tranform filter struct (wtf_s).

SIDE EFFECTS

   wtfname is a valid wavelet filter name; otherwise error.

DESCRIPTION

   modwt_filter returns a wtf_s struct containing the MODWT wavelet (high-pass)
   and scaling (low-pass) filter coefficients.
   MODWT filter.

   The wtf_s struct has fields:
   * g         -- scaling (low-pass) filter coefficients (vector).
   * h         -- wavelet (high-pass) filter coefficients (vector).
   * L         -- filter length (= number of coefficients) (integer).
   * name      -- name of wavelet filter (string).
   * wtfclass  -- class of wavelet filters (string).
   * transform -- name of transform (string).

   Typing modwt_filter('list') displays a list of supported filters.
 
   Typing modwt_filter('all') returns a struct array of wtf_s of all
   supported filters.

ERRORS


EXAMPLE

    [wtf] = modwt_filter('la8');

NOTES

   modwt_filter is a wrapper function around the wtfilter function.  

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   wtfilter, dwt_filter

 TOOLBOX
   wmtsa/dwt

 CATEGORY
   Filters: Filters

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-09-18

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS

   Based on the original function (myfilter.m) by Brandon Whitcher.

REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_equivalent_filter

[top]

NAME

   modwt_equivalent_filter -- Calculate MODWT equivalent filter for J levels.

 SYNOPSIS
   [hJ, gJ, LJ, name] = modwt_equivalent_filter(wtfname, J)

INPUTS

   wtfname      = string containing name of a WMTSA-supported wavelet filter,
                  case-insensitve.
   J            = number of levels (integer > 0)

OUTPUTS

   hJ           = 1xJ numeric cell array of containing equivalent wavelet
                  filter coefficients.
   gJ           = 1xJ numeric cell array of containing equivalent scaling
                  filter coefficients.
   LJ           = 1xJ numeric cell array containing widths of the
                  equivalent filters (L_j).

SIDE EFFECTS


DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-01-27

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cum_wav_svar

[top]

NAME

   modwt_cum_wav_svar -- Calculate cumulative sample variance of 
         MODWT wavelet coefficients.

 SYNOPSIS
   [cwsvar] = modwt_cum_wav_svar(WJt, wtfname)

INPUTS

   WJt          -  NxJ array of MODWT wavelet coefficents
                   where N = number of time intervals
                         J = number of levels
   wtfname      -  string containing name of a WMTSA-supported MODWT 
                   wavelet filter.

OUTPUTS

   cwsvar       -  cumulative wavelet sample variance.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


ALGORITHM

   cwsvar(j,t) = 1/N * sum( WJt^2 subscript(j,u+nuH_j mod N)) 
                    for t = 0,N-1 at jth level

   For details, see page 189 of WMTSA.   

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_cir_shift, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-16

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/modwt_cum_level_wvar_tcase

[top]

NAME

   modwt_cum_level_wvar_tcase -- munit test case to test modwt_cum_level_wvar.

USAGE

   run_tcase('modwt_cum_level_wvar_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_cum_level_wvar testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_cum_level_wvar

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] toolbox.subdirectory/modwt_cum_level_wcov_tcase

[top]

NAME

   modwt_cum_level_wcov_tcase -- munit test case to test modwt_cum_level_wcov.

USAGE

   run_tcase('modwt_cum_level_wcov_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for modwt_cum_level_wcov testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   modwt_cum_level_wcov

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cum_level_wcov

[top]

NAME

   modwt_cum_level_wcov -- Compute cumulative level wavelet covariance.

 SYNOPSIS
   [clwcov, CI_clwcov] = modwt_cum_level_wcov(wcov, VARwcov, [p])

INPUTS

   wcov         = wavelet covariance (Jx1 vector).
   VARwcov      = covariance of wcov (Jx1 vector).
   p            = (optional) percentage point for confidence interval.
                  default: 0.025 ==> 95% confidence interval

OUTPUTS

   clwcov       = cumulative level wavelet covariance (Jx1 vector)
   CI_clwcov    = confidence interval of cumulative level wavelet covariance (Jx2 array).
                  lower bound (column 1) and upper bound (column 2).

SIDE EFFECTS


DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM

    clwcov_m  = sum(wcov_j) for j = 1,m
    VARclwcov_m  = sum(VARwcov_j) for j = 1,m

REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

    2004-06-22

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift_wcoef_bdry_indices

[top]

NAME

   modwt_cir_shift_wcoef_bdry_indices - Return indices of the 
        circularly shifted MODWT wavelet coefficients influenced by 
        circularity conditions at jth level.

 SYNOPSIS
   [lower_boundary_indices, upper_boundary_indices] = modwt_cir_shift_wcoef_bdry_indices(wtfname, N, j)

INPUTS

   wtfname      - string containing name of a WMTSA-supported MODWT wavelet filter.
   N            - number of data samples.
   j            - level (index) of scale

OUTPUTS

   lower_boundary_indices = vector containing indices of circularly shifted 
                            MODWT wavelet coefficients influenced by circularity
                            conditions at lower boundary.
   upper_boundary_indices = vector containing indices of circularly shifted 
                            MODWT wavelet coefficients influenced by circularity
                            conditions at upper boundary.

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported wavelet, otherwise error.
   2.  N > 0, otherwise error.
   3.  j > 0, otherwise error.

DESCRIPTION

   modwt_cir_shift_wcoef_bdry_indices returns the indices of the
   circularly shifted MODWT wavelet coefficients that are affected by 
   the circularity conditions at the boundaries.

EXAMPLE

 NOTES:
   1. Matlab uses an array indexing scheme starting at 1 whereas WMTSA
      uses zero-based arrays.  An offset of 1 is added  to shift array 
      indices values.

ALGORITHM

   lower_boundary = [0,  L_j - 2 - abs(nuH_j)]  (equation 198b of WMSTA)
   upper_boundary = [N - abs(nuH_j), N - 1]    (equation 198b of WMSTA)

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter, advance_wavelet_filter, equivalent_filter_width

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift_wcoef_bdry

[top]

NAME

   modwt_cir_shift_wcoef_bdry -- Calculate lower and upper bounds of 
       MODWT wavelet coefficients affected by circular shift for J0 levels.

 SYNOPSIS
   [lower_bound, upper_bound] = modwt_cir_shift_wcoef_bdry(wtfname, N, J0)

INPUTS

   wtfname      - string containing name of a WMTSA-supported MODWT wavelet filter.
   N            - number of data samples.
   J0           - largest or partial level of MODWT.

OUTPUTS

   lower_bound  - J0x1 vector containing lower bound for each jth level.
   upper_bound  - J0x1 vector containing upper bound for each jth level.

SIDE EFFECTS

   1.  wavelet is a WMTSA-supported wavelet, otherwise error.
   2.  N > 0, otherwise error.
   3.  J0 > 0, otherwise error.

DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 198 of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter, modwt_cir_shift_scaling_coef_bdry_indices

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift_scoef_bdry_indices

[top]

NAME

   modwt_cir_shift_scoef_bdry_indices - Return indices of the MODWT 
        scaling coefficients at boundaries affected by circularly shifting
        for the jth level.

 SYNOPSIS
   [lower_boundary_indices, upper_boundary_indices] = modwt_cir_shift_scoef_bdry_indices(wtfname, N, j)

INPUTS

   wtfname      - string containing name of a WMTSA-supported MODWT wavelet filter.
   N            - number of data samples.
   j            - level (index) of scale

OUTPUTS

   lower_boundary_indices - vector containing indices of circularly shifted 
                            MODWT scaling coefficients at lower boundary.
   upper_boundary_indices - vector containing indices of circularly shifted 
                            MODWT scaling coefficients at upper boundary.

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported wavelet, otherwise error.
   2.  N > 0, otherwise error.
   3.  j > 0, otherwise error.

DESCRIPTION


EXAMPLE


NOTES

   1. MATLAB uses an array indexing scheme starting at 1 whereas WMTSA
      uses zero-based arrays.  Use an offset to shift array indices values.

ALGORITHM

   lower_boundary = [0,  L_j - 2 - |nuG_j|]  (equation 198c of WMSTA)
   upper_boundary = [N - |nuG_j|, N - 1]    (equation 198c of WMSTA)

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter, advance_scaling_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift_scoef_bdry

[top]

NAME

   modwt_cir_shift_scoef_bdry -- Calculate lower and upper bounds of 
         MODWT scaling coefficients affected by circular shifting for level J0.

 SYNOPSIS
   [lower_bound, upper_bound] = modwt_cir_shift_scoef_bdry(wtfname, N, J0)

INPUTS

   wtfname      - string containing name of a WMTSA-supported MODWT wavelet filter.
   N            - number of data samples.
   J0           - largest or partial level of MODWT.

OUTPUTS

   lower_bound  -  lower bound index at level J0.
   upper_bound  -  upper bound index at level J0.

SIDE EFFECTS

   1.  wavelet is a WMTSA-supported wavelet, otherwise error.
   2.  N > 0, otherwise error.
   3.  J0 > 0, otherwise error.

DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 198 of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter, modwt_cir_shift_wavelet_coef_bdry_indices

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift_mra_bdry_indices

[top]

NAME

   modwt_cir_shift_mra_bdry_indices - Return indices of the MODWT MRA 
       coefficients influenced by circularity conditions at jth level.

 SYNOPSIS
   [lower_boundary_indices, upper_boundary_indices] = modwt_cir_shift_mra_bdry_indices(wtfname, N, j)

INPUTS

   wtfname      - string containing name of a WMTSA-supported MODWT wavelet filter.
   N            - number of data samples.
   j            - level (index) of scale

OUTPUTS

   lower_boundary_indices - vector containing indices of MRA influenced
                            circularity conditions at lower boundary for jth level.
   upper_boundary_indices = vector containing indices of MRA influenced
                            circularity conditions at upper boundary for jth level.

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported wavelet, otherwise error.
   2.  N > 0, otherwise error.
   3.  j > 0, otherwise error.

DESCRIPTION

   modwt_cir_shift_mra_bdry_indices returns the indices of the MRA reconstruction
   (details and J0th level smooth) that are affected by the circularity
   conditions at the boundaries.

EXAMPLE


NOTES

   1. Matlab uses an array indexing scheme starting at 1 whereas WMTSA
      uses zero-based arrays.  An offset of 1 is added  to shift array 
      indices values.

ALGORITHM

   lower_boundary = [0,  L_j - 2]           (page 199 of WMSTA)
   upper_boundary = [N - L_j + 1, N - 1]    (page 199 of WMSTA)

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter, equivalent_filter_width

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift_mra_bdry

[top]

NAME

   modwt_cir_shift_mra_bdry -- Calculate lower and upper bounds of 
       MODWT MRA coefficients affected by circular shift for J0 levels.

 SYNOPSIS
  [lower_bound, upper_bound] = modwt_cir_shift_mra_bdry(wtfname, N, J0)

INPUTS

   wtfname      - string containing name of a WMTSA-supported MODWT wavelet filter.
   N            - number of data samples.
   J0           - largest or partial level of MODWT.

OUTPUTS

   lower_bound  - J0x1 vector containing lower bound for each jth level.
   upper_bound  - J0x1 vector containing upper bound for each jth level.

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported wavelet, otherwise error.
   2.  N > 0, otherwise error.
   3.  J0 > 0, otherwise error.

DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 199 of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter, modwt_cir_shift_mra_bdry_indices

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_cir_shift

[top]

NAME

   modwt_cir_shift -- Circularly shift (advance) MODWT coefficients for alignment with original time series.

 SYNOPSIS
   [TWJt]        - modwt_cir_shift(WJt, [], wtfname)
   [TVJ0t]       - modwt_cir_shift([], VJ0t, wtfname, J0)
   [TWJt, TVJ0t] - modwt_cir_shift(WJt, VJ0t, wtfname)

INPUTS

   WJt           - NxJ array of MODWT wavelet coefficents
                   where N = number of time intervals
                          J = number of levels
   VJ0t          - Nx1 vector of MODWT scaling coefficients at level J0.
   wtfname       - name of a WMSTA-supported MODWT wavelet filter.
   J0            - largest or partial level of MODWT.

OUTPUTS

   TWJt          -  NxJ array of circularly shifted (advanced) MODWT 
                    wavelet coefficents
   TVJ0t         -  Nx1 vector of circularly advanced MODWT scaling
                    coefficients at level J0.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES

   If WJt is not supplied, user must supply value of J0.

ALGORITHM

   See pages 114-115 equation 114b of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

  advance_scaling_filter, advance_wavelet_filter,
  advance_time_series_filter, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_choose_nlevels

[top]

NAME

   modwt_choose_nlevels -- Select J0 based on choice, wavelet filter and data series length.

USAGE

   J0 = modwt_choose_nlevels(choice, wtfname, N)

INPUTS

   * choice      -- choice for method for calculating J0 (string)
                    Valid Values:
                     'conservative'
                     'max', 'maximum'
                     'supermax', 'supermaximum'
   * wtfname     -- wavelet transform filter name (string)
                    Valid Values:  see modwt_filter
   * N           -- number of observations.

OUTPUT

   * J0          -- number of levels (J0) based selection criteria.

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported MODWT wtfname, otherwise error.
   2.  N > 0, otherwise error.

DESCRIPTION


EXAMPLE

   J0 = modwt_choose_nlevels('convservative', 'la8', N)

ERRORS

   WMTSA:MODWT:InvalidNumLevels    =  Invalid type/value specified for nlevels.

ALGORITHM

   for 'conservative':              J0  < log2( N / (L-1) + 1)
   for 'max', 'maximum':            J0 =< log2(N)
   for 'supermax', 'supermaximum':  J0 =< log2(1.5 * N)

   For further details, see page 200 of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24   

COPYRIGHT

   (c) 2003, 2004, 2005 Charles R. Cornish

REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt.modwt/modwt

[top]

NAME

   modwt -- Compute the (partial) maximal overlap discrete wavelet transform (MODWT).

 SYNOPSIS
   [WJt, VJt, att] = modwt(X, [wtf], [nlevels], [boundary], [{opts}])

INPUTS

   * X          -- set of observations 
                   (vector of length NX or matrix of size NX x Nchan)
   * wtf        -- (optional) wavelet transform filter name or struct 
                   (string, case-insensitve or wtf struct).
                   Default:  'la8'
   * nlevels    -- (optional) maximum level J0 (integer) 
                   or method of calculating J0 (string).
                   Valid values: integer>0 or a valid method name
                   Default:  'conservative'
   * boundary   -- (optional) boundary conditions to use (string)
                   Valid values: 'circular' or 'reflection'
                   Default: 'reflection'
   * opts       -- (optional) Additional function options.

OUTPUTS

   * WJt        -- MODWT wavelet coefficents (NW x J x NChan array).
   * VJt        -- MODWT scaling coefficients (NW x {1,J} x NChan vector).
   * att        -- MODWT transform attributes (struct).

SIDE EFFECTS

   1.  wtf is either a string containing a WMTSA-supported MODWT wavelet filter
       or a valid wtf struct; otherwise error.
   2.  nlevels is an integer > 0, or is a string containing valid method for
       choosing J0; otherwise error.

DESCRIPTION

   modwt calculates the wavelet and scaling coefficients using the maximal
   overlap discrete wavelet transform (MODWT).

   The optional input arguments have default values:
   * wtf      -- 'la8' filter
   * nlevels  -- 'convservative' --> J0 < log2( N / (L-1) + 1)
   * boundary -- 'reflection'.

   Optional input arguments are specified as name-value pairs:
   * RetainVJ -- Boolean flag indicating whether to scaling coefficients
                   have been retained at all levels.
                   Values:  1 = true,  all VJ retained, 
                            0 = false, VJ retained for J0 level.
                   Default: 0, VJ retained only at J0 level.

   The output argument att is a structure with the following fields:
   * Transform  -- name of transform ('MODWT')
   * WTF        -- name of wavelet transform filter or a wtf_s struct.
   * NX         -- number of observations in original series (= length(X))
   * NW         -- number of wavelet coefficients
   * J0         -- number of levels of partial decompsition.
   * NChan      -- number of channels in a multivariate dataset.
   * Boundary   -- boundary conditions applied.
   * Aligned    -- Boolean flag indicating whether coefficients are aligned
                   with original series (1 = true) or not (0 = false).
   * RetainVJ -- Boolean flag indicating whether VJ scaling coefficients
                   at all levels have been retained (1= true) or not (0 = false).

EXAMPLE

   load_ecg;
   [WJt, VJt, att] = modwt(ecg, 'la8', 6, 'reflection');

WARNINGS

   WMTSA:MODWT:LargeJ0  =  'MODWT JO > log2(Number of samples).'

ERRORS

   WMTSA:invalidBoundary           =  'Invalid Transform boundary method.'

NOTES


ALGORITHM

   See pages 177-178 of WMTSA for description of Pyramid Algorithm for
   the MODWT.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwtj, modwt_filter, modwt_choose_nlevels, nargerr, argterr

 TOOLBOX
   wmtsa/wmtsa

 CATEGORY
   Transforms: MODWT

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-04-23

COPYRIGHT

   (c) 2003, 2004, 2005 Charles R. Cornish

CREDITS

   Based on the original function (modwt_dbp.m) by Brandon Whitcher.

REVISION

   $Revision: 630 $

[Functions] toolbox.subdirectory/load_datasets

[top]

NAME

   load_datasets_tcase -- munit test case to test load_datasets.

USAGE

   run_tcase('load_datasets_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for load_datasets testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-08-01

COPYRIGHT

   2005-01-26

CREDITS


REVISION

   $Revision: 612 $

[Functions] toolbox.subdirectory/list2struct

[top]

NAME

   list2struct_tcase -- munit test case to test list2struct.

USAGE

   run_tcase('list2struct_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for list2struct testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   list2struct

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-18

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/list2struct

[top]

NAME

   cell2struct -- Convert a list (cell array) of name-value pairs to a struct.

USAGE

   [s] = list2struct(list)

INPUTS

   * list         -- list of name-value pairs (cell array)

OUTPUTS

   * s            -- structure fieldnames with values (struct).

DESCRIPTION

   list2struct converts a list (cell array) of name-value pair entries
   into a structure with field names (name) and field values (value).

EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX
   wmtsa/utils

 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-18

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS

 MATLAB VERSION
   7.0

REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/linesegment_plot

[top]

NAME

   linesegment_plot -- Plot a series of line segments on current plot axes.

 SYNOPSIS
   [hline] = linesegment_plot(x1, y1, x2, y2, lineProp)

INPUTS

   x1           = vector of x-axis start points.
   x1           = vector of y-axis start points.
   x1           = vector of x-axis end points.
   x1           = vector of y-axis start points.
   lineProp     = (optional) struct containing line properties to override.

OUTPUTS

   hline = vector containing handles to Line (segment) objects drawn.

SIDE EFFECTS


DESCRIPTION

   linesegment_plot plots a series of line segments defined by (x1,x2)->(x2,y2).
   (x1,y1) are start points; (x2,y2) are end points.

EXAMPLE


NOTES


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/05/24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/linesegment

[top]

NAME

   linesegment -- Plot a set of line segments as specified by their start and end points.

 SYNOPSIS
   [hline] = linesegment(xstart, ystart, xend, yend, [lineProp])

INPUTS

   xstart       = vector of x-coordinates for start of line segments.
   ystart       = vector of y-coordinates for start of line segments.
   xend         = vector of x-coordinates for end of line segments.
   yend         = vector of y-coordinates for end of line segments.

OUTPUTS


SIDE EFFECTS


DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-01-09

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/iswtf

[top]

NAME

   iswtf -- Determine if input is a valid wtf struct.

 SYNOPSIS
   [tf] = iswtf(wtf)

INPUTS

   * wtf        -- wavelet tranform filter struct (wtf_s).

OUTPUTS

   * tf         -- flag indicating whether a valid valid wtf struct (Boolean)

SIDE EFFECTS

   Function call requires a minimum of 1 input arguments; otherwise error.

DESCRIPTION

   iswtf determines whether the input argument is a valid wtf struct, i.e.
   having the wtf_s struct fields:
   * g         -- scaling (low-pass) filter coefficients (vector).
   * h         -- wavelet (high-pass) filter coefficients (vector).
   * L         -- filter length (= number of coefficients) (integer).
   * name      -- name of wavelet filter (character string).
   * wtfclass  -- class of wavelet filters (character string).
   * transform -- name of transform (character string).

EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX
   wmtsa/dwt

 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/infomsg.m

[top]

NAME

 infomsg  -- Display an informative message based on global VERBOSITY setting.

USAGE

   infomsg(msg_str, [verbosity_level])

INPUTS

   msg_str         =  Informational message to be displayed.
   verbosity_level =  (optional) verbosity level, integer or character value
                      Valid Values:  an integer or character string with
                      possible values:
                                     0, operational
                                     2, very, veryvebose
                                     3, extremely, extremelyvebose
                      Default:       1 = verbose

OUTPUTS

   none

SIDE EFFECTS

   1. Depending on setting of global variable VERBOSITY, msg_str is
      displayed to the command window.
   2. Error is raised if verbosity_level is an invalid value.

DESCRIPTION

   infomsg displays the informative message (msg_str) to the command
   windwo based on the setting of the global variable VERBOSITY.

NOTES

   1. Global variable VERBOSITY must be declared and defined (set) to the
      desired verbosity level.  Use set_infomsg_verbosity_level to set the
      verbosity level.
   2. Value of verbosity_level may be an integer or character.  The
      function evaluates verbosity_level, determines the integer
      value of verbosity_level.

SEE ALSO

   set_infomsg_verbosity_level

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-28

COPYRIGHT


CREDITS

   argterr is a rewrite of errargt 
   by M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi
   which is part of the MATLAB wavelet toolkit.

REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/imodwtj

[top]

NAME

   imodwtj -- Compute inverse MODWT for jth level.

 SYNOPSIS
   Vout = imodwtj(Wt_j, Vin, ht, gt, j)

INPUTS

   Wt_j            - MODWT wavelet coefficients for jth level.
   Vin             - Scaling coefficients at J0, or j-1 level.
   ht              - MODWT avelet filter coefficients.
   gt              - MODWT Scaling filter coefficients.
   j               - Level of decomposition.

OUTPUTS

   Vout            - MODWT scaling coefficients (residuals) for jth level.

DESCRIPTION

   modwtj is a Mex-Function written in C, which implements the Pyramid Alogrithm
   of the MODWT for the jth level.  It is usually used as an internal function
   called by imodwt or imodwt_mra.

   To compile, type:  mex modwtj.c

EXAMPLE

   Vout = imodwtj(Wt_j, Vin, ht, gt, j);

ALGORITHM


REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   imodwt, imodwt_mra

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-05-01

COPYRIGHT


CREDITS

   Based on the original function (imodwt.c) by Brandon Whitcher.

REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/imodwt_tcase.m

[top]

NAME

   imodwt_tcase -- munit test case to test imodwt function.

USAGE

   run_tcase('imodwt_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for imodwt testcase.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/imodwt_smooth

[top]

NAME

   imodwt_smooth -- Calculate smooths at J0 level via inverse maximal overlap discrete wavelet transform (IMODWT).

 SYNOPSIS
   [SJt, att] = imodwt_smooth(VJt, wtfname, J0)

INPUTS

   VJt         =  Nx1 vector of MODWT scaling coefficients at J0 level.
   wtfname      =  string containing name of a WMTSA-supported MODWT wavelet 
                   filter.

OUTPUT

   SJOt         =  vector of reconstituted smoothed data series.
   att          =  structure containing IMODWT transform attributes
   J0           =  number of levels of partial decomposition.

SIDE EFFECTS

   1.  wtfname is a WMTSA-supported MODWT wavelet filter; otherwise error.

DESCRIPTION


EXAMPLE

   [SJt, att] = imodwt_smooth(VJt, 'la8');

NOTES


ALGORITHM

   See pages 177-179 of WMTSA for description of Pyramid Algorithm for
   the inverse MODWT multi-resolution analysis.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   imodwtj, imodwt, imodwt_details, modwt_filter, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-01

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/imodwt_mra_verification_tcase

[top]

NAME

   imodwt_mra_verification_tcase -- munit test case to verify results of imodwt_mra transform.

USAGE

   run_tcase('imodwt_mra_verification_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for imodwt_mra testcase.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/imodwt_mra

[top]

NAME

 imodwt_mra -- Calculate MODWT multi-resolution details and smooths from wavelet coefficients via IMODWT transform.

USAGE

   [DJt, SJt]  = imodwt_smooth(WJt, VJt, wavelet)

INPUTS

   * WJt        -- MODWT wavelet coefficents (N x J x NChan array).
   * VJt        -- MODWT scaling coefficients (N x {1,J} x NChan vector).
   * w_att      -- MODWT transform attributes (struct).

OUTPUT

   * DJt        -- MODWT details coefficents (N x J x NChan array).
   * SJt        -- MODWT smooth coefficients (N x {1,J} x NChan vector).
   * mra_att    -- structure containing IMODWT MRA transform attributes

DESCRIPTION

   modwt_mra computes the multi-resolution detail and smooth coefficients
   fomr the MODWT wavelet and scaling coefficients.

EXAMPLE


NOTES


BUGS


TODO

   1. Add support for retain DJt (RetainDJt)
   2. Rewrite modwt_details.
   3. Rewrite modwt_smooth.

ALGORITHM

   See pages 177-179 of WMTSA for description of Pyramid Algorithm for
   the inverse MODWT multi-resolution analysis.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   imodwt_details, imodwt_smooth, imodwtj, modwt, modwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-01

COPYRIGHT


REVISION

   $Revision: 630 $

[Functions] wmtsa.dwt/imodwt_details

[top]

NAME

   imodwt_details -- Calculate details via inverse maximal overlap discrete wavelet transform (IMODWT).

 SYNOPSIS
   [DJt, att] = imodwt_details(WJt, wtfname)

INPUTS

   WJt          -  NxJ array of MODWT wavelet coefficents
                   where N  = number of time points
                         J = number of levels.
   wtfname      -  (optional) string containing name of a WMTSA-supported 
                   MODWT wavelet filter.
                   Valid Values:  see modwt_filter

OUTPUT

   DJt          -  NxJ array of reconstituted details of data series for J0 scales.
   att          -  structure containing IMODWT transform attributes.

SIDE EFFECTS

   1.  wavelet is a WMTSA-supported MODWT wavelet filter; otherwise error.

DESCRIPTION

   The output parameter att is a structure with the following fields:
       name      - name of transform (= 'MODWT')
       wtfname   - name of MODWT wavelet filter
       npts      - number of observations (= length(X))
       J0        - number of levels 
       boundary  - boundary conditions

EXAMPLE

   [DJt, att] = imodwt_details(WJt, VJ0, 'la8');

NOTES


ALGORITHM

   See pages 177-179 of WMTSA for description of Pyramid Algorithm for
   the inverse MODWT multi-resolution analysis.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   imodwtj, imodwt, imodwt_smooth, modwt_filter, modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-01

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt.modwt/imodwt

[top]

NAME

   imodwt -- Calculate the inverse (partial) maximal overlap discrete wavelet transform (IMODWT).

USAGE

   X = imodwt(WJt, VJt, att)

INPUTS

   * WJt        -- MODWT wavelet coefficents (N x J x NChan array).
   * VJt        -- MODWT scaling coefficients (N x {1,J} x NChan vector).
   * att        -- MODWT transform attributes (struct).

OUTPUT

   * X          -- reconstituted set of observations (vector).

DESCRIPTION

   imodwt computes the reconstituted time series from the MODWT wavelet
   and scaling coefficients.

EXAMPLE

   X = imodwt(WJt, VJt, att);

ERRORS

   WMTSA:InvalidNumArguments       =  'Invalid number of arguments specified in function call'
   WMTSA:InvalidWavelet            =  'Invalid wavelet filter specified'

NOTES

   1. Tests indicate othat riginal and reconstituted time series agree within a 
      precision of 10^-11, which is larger than the 10^15 numeric precision.
  
   2. If the MODWT was calculated using 'reflection' boundary
      conditions, which extends the time series, and the  computed coefficients, 
      have been truncated to the length of the original series.  The inverse MODWT 
      will yield a reconstituted time series that differs from the original.  
      If using 'reflection' boundary conditions, compute the MODWT with the 
      opt.TruncateCoefs = 0 option (the default) to compute IMODWT which
      yields and exact replica of the original.

ALGORITHM

   See pages 177-179 of WMTSA for description of Pyramid Algorithm for
   the inverse MODWT.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
   Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   modwt, imodwtj

 TOOLBOX
   wmtsa/dwt

 CATEGORY
   modwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-01

COPYRIGHT

   (c) 2003, 2004, 2005 Charles R. Cornish

REVISION

   $Revision: 632 $

[Functions] wmtsa.utils/fuzzy_diff

[top]

NAME

 fuzzy_diff --  Find differences in two arrays exceeding fuzzy_tolerance.

USAGE

   result = fuzzy_diff(a, b, [fuzzy_tol], [mode])

INPUTS

   a                = first array or vector of values
   b                = second array or vector of values
   fuzzy_tol        = (optional) minimum tolerance or threshold
                      Valid values:  >= 0
                      Default: 0
   mode             = (optional) format of returned result
                      Valid Values:  'details', 'summary'
                      Default:  'details'

OUTPUT

   result           = array or number containing the result of comparison.

DESCRIPTION

   fuzzy_diff compares two arrays and allows for approximate equality when strict
   equality may not exist due to minor differences due to rounding errors.  
   fuzzy_diff subtracts two arrays and identifies those elements whose 
   differences exceed the fuzzy tolerance threshold.  

   The function has 2 modes of operation:
      details   = return an array of size(a) with elements 
                   = 0,   for differences between a and b <  fuzzy_tolerance
                   = a-b, for differences between a and b >= fuzzy_tolerance
      summary   = return a number whose values 
                   = 0, for no differences within fuzzy_tolerance
                   > 0, number of elements >= fuzzy_tolerance

   Note: fuzzy_diff compares to arrays on an absolute threshold (fuzzy_tol).
         Use nsigdig_diff to compare arrays that differ by a significant number
         of digits.

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-01   

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/flipvec_tcase

[top]

NAME

   flipvec_case -- munit test case for flipvec.

USAGE

   run_tcase('flipvector_tcase')

INPUTS

   (none)

OUTPUTS

   * tc          -- tcase case struct (tcase_s)

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT

   (c) Charles R. Cornish 2004, 2005

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/flipvec.m

[top]

NAME

   flipvec -- Flip a vector.

 SYNOPSIS
   [y] = flipvec(x)

INPUTS

   * x         -- vector of values.

OUTPUTS

   * y         -- vector of values in reversed order.

DESCRIPTION

   Function checks whether item is a vector (row or column), i.e.
   has ndim = 2 and a singleton dimension, and then
   flips the vector (i.e. reverse order).

ERRORS

    WMTSA:InvalidNumArguments
    WMTSA:NotAVector

SEE ALSO

   isvector

 TOOLBOX
   wmtsa/utils

 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-27

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/filter_center_of_energy

[top]

NAME

   filter_center_of_energy -- Calculate filter center of energy.

 SYNOPSIS
   [coe] = filter_center_of_energy(a)

INPUTS

   a            = filter coefficients for filter a.

OUTPUTS

  coe           = center of energy for filter a.

DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/filter_autocorrelation_width

[top]

NAME

   filter_autocorrelation_width - Calculate autocorrelation width o scaling filter.

 SYNOPSIS
   [width_a] = filter_autocorrelation_width(wtfname, j, [method])

INPUTS

   wtfname      = string containing name of a WMTSA-supported MODWT wavelet
                  filter, case-insensitve
   j            = jth level (index) of scale or a range of j levels of scales
                  (integer or vector of integers).
   method       = (optional) name of method to use for calculations.

OUTPUTS

   width_a      = filter autocorrelation width for specified levels
                  (integer or Jx1 vector of integers).

SIDE EFFECTS

   1.  j > 0, otherwise error.

DESCRIPTION

   The function calculates the filter autocorrelation width of 
   scaling filters for the specified wavelet.
 
   The user may optionally specify one of two methods of calculation:
     'quick'  - width_a = 2^j (default)
     'long'   - Equation 103 of WMTSA (see ALGORTHIM section.

EXAMPLE

   [width_a] = filter_autocorrelation_width('haar', 5,)
   [width_a] = filter_autocorrelation_width('la8', 1:10, 'quick')
   [width_a] = filter_autocorrelation_width('d4', [2,3,5,7], 'long')

ALGORITHM

   width_a {g_j,l} = (sum(g_j,l))^2 / sum(g_j,l^2)
   See equation 103 of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   dwt_equivalent_filter, dwt_filter

 TOOLBOX
   WMTSA

 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-12-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/figure_footer

[top]

NAME

   figure_footer -- Print the string in the footer text area of a figure.

 SYNOPSIS
   [htext] = figure_footer(str, hfigure)

INPUTS

   str          = string to print in footer.
   hfigure      = (optional) handle to figure to print footer.
                  Default:  current figure

OUTPUTS

   htext        = handle to text object of figure footer.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/06/04

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.plotutils/figure_datestamp

[top]

NAME

   figure_datestamp -- Print a datestamp in footer area of a figure.

 SYNOPSIS
   [htext] = figure_datestamp(filename, hfigure)

INPUTS

   filename     = (optional) string containing filename.
   hfigure      = (optional) handle to figure to print footer.
                  Default:  current figure

OUTPUTS

   htext        = handle to text object of figure footer.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003/06/04

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/equivalent_filter_width

[top]

NAME

   equivalent_filter_width -- Calculate width of the equivalent wavelet or scaling filter.

 SYNOPSIS
   [Lj] = equivalent_filter_width(L, j)

INPUTS

   * L          --  width of wavelet or scaling filter (unit scale).
   * j          --  jth level (index) of scale or a range of j levels of scales. 
                    (integer or vector of integers).

OUTPUTS

   * Lj         -- equivalent width of wavelet or scaling filter for specified
                   levels (integer or Jx1 vector of integers).

 SIDEEFFECTS
   1.  L > 0, otherwise error.
   2.  j > 0, otherwise error.

DESCRIPTION

   Given the length of a wavelet or scaling filter, the function calculates the
   width of the equivalent filter a level or range of levels j for the specified
   base filter width L.

ALGORITHM

    Lj = (2^j - 1) * (L - 1) + 1  (equation 96a of WMTSA)

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-24

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/encode_errmsg

[top]

NAME

   encode_errmsg  -- Encode error message for specified err_id.

USAGE

   [errmsg] = encode_errmsg(err_id, err_table_ps, [varargin])

INPUTS

   * err_id         -- error message id (character string).
   * err_table_ps   -- error lookup table (character string or struct).
   * varargin       -- (optional) supplemental values to encode in errmsg.

OUTPUTS

   * errmsg         -- encoded error message (character string).

SIDE EFFECTS


DESCRIPTION

   encode_errmsg encodes an error message (errmsg) for a specified error message 
   id (err_id).  The function loads the error message table (err_table) from the
   specified path, searches for the matching (err_table.err_id) entry and 
   returns the error message template (err_table.errmsg).  Based on the number 
   of message arguments (err_table.nargs), the function encodes the errmsg using
   the variable number of arguments (varargin) passed on the function call.

   The err_table is a structure array with the following fields:
   * err_id     -- error message id (character string).
   * err_msg    -- error message template (character string).
   * nargs      -- number of supplement arguments to use for encoding errmsg.

   The input argument 'err_table_ps' may be either a character string or a struct.
   If a  character string, err_table_ps is full path to a function or script 
   containing the error table struct to run and load.  If a struct, then the 
   struct passed as the value in err_table_ps argument is used.

EXAMPLE

   % Error table load via function wmtsa_err_table.
   % Name of required argument is 'transform'.
   errmsg = encode_errmsg('WMTSA:missingRequiredArgument', ...
                           wmtsa_err_table, 'transform'));

WARNINGS


ERRORS


NOTES


SEE ALSO

 TOOLBOX
   wmtsa/utils

 CATEGORY
   WMTSA Utilities

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-06-25

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/dwtjm

[top]

NAME

   dwtjm -- Calculate jth level DWT coefficients (MATLAB implementation).

USAGE

   [Wout, Vout] = dwtjm(Vin, h, g, j)

INPUTS

   * Vin         -- Input series for j-1 level (i.e. DWT scaling coefficients) 
   * h           -- DWT wavelet filter coefficients.
   * g           -- DWT scaling filter coefficients.
   * j           -- level (index) of scale.

OUTPUTS

   * Wout        -- DWT wavelet coefficients for jth scale.
   * Vout        -- DWT scaling coefficients for jth scale.

SIDE EFFECTS


DESCRIPTION

   dwtjm is an implementation in MATLAB code of the DWT transform for 
   the jth level, and is included in the toolkit for illustrative purposes 
   to demonstrate the pyramid algothrim.

   For speed considerations, the dwt function uses the C implementation of 
   the DWT transform, modwtj, which linked in as a MEX function.

EXAMPLE

   X = wmtsa_data('ecg');
   wtf = dwt_filter('haar');
   % Compute the j = 1 level coefficients for ECG time series.
   j = 1;
   [Wout, Vout] = dwtjm(X, h, g, j);

NOTES


BUGS


TODO


ALGORITHM

   See page 100-101 of WMTSA for DWT pyramid algorithm.

REFERENCES


SEE ALSO

   dwtj, dwt, dwt_filter

 TOOLBOX
   wmtsa

 CATEGORY
   dwt

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-Sep-03

COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/dwt_wavelet_transfer_function

[top]

NAME

   dwt_wavelet_transfer_function -- Calculate transfer function for
     frequencies f for specified DWT wavelet filter and (optionally) jth level.

 SYNOPSIS
   H_j = dwt_wavelet_transfer_function(f, wavelet, [j])

INPUTS

   f            - vector of sinsuoidal frequency.
   wtfname      - name of a WMSTA-supported MODWT scaling filter.
   j            - (optional) level (index) of scale.

OUTPUTS

   H            - vector of the transfer function values for DWT wavelet filter h
                  at frequencies f.
   H_j          - vector of the transfer function values for DWT wavelet filter h
                  at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 69 of WMTSA for H.
   See page 96 of WMTSA for H_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/dwt_wavelet_sgf

[top]

NAME

   dwt_wavelet_sgf -- Calculate squared gain function for specified DWT 
     scaling filter at frequencies f and at (optionally) jth level.

 SYNOPSIS
   Hs_j = dwt_wavelet_sgf(f, wtfname, [j])

INPUTS

   f            = vector of sinsuoidal frequency.
   wtfname      = name of a WMSTA-supported MODWT scaling filter.
   j            = (optional) level (index) of scale.

OUTPUTS

   Hs           = vector of squared gain function values for DWT wavelet
                  filter h at frequencies f.
   Hs_j         = vector of squared gain function values for DWT wavelet
                  filter h at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page  69 of WMTSA for Hs.
   See page 154 of WMTSA for Hs_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   dwt_wavelet_transfer_function

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/dwt_verification_tcase

[top]

NAME

   dwt_verification_tcase -- munit test case to verify results of dwt transform.

USAGE

   run_tcase('dwt_verification_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for dwt testcase.

DESCRIPTION


SEE ALSO

   dwt_wvar

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Structures] Structures/w_att_s

[top][parent]

NAME

   w_att_s -- wavelet transform attributes struct.

DESCRIPTION

  w_att_s struct has fields:
   * Transform  -- name of transform ('MODWT') (string).
   * WTF        -- name of wavelet transform filter or a wtf_s struct (string or struct).
   * NX         -- number of observations in original series (= length(X)) (integer).
   * NW         -- number of wavelet coefficients (integer).
   * J0         -- number of levels of partial decompsition (integer).
   * NChan      -- number of channels in a multivariate dataset (integer).
   * Boundary   -- boundary conditions applied (string).
   * Aligned    -- Boolean flag indicating whether coefficients are aligned
                   with original series (1 = true) or not (0 = false) (boolean).
   * RetrainVJ -- Boolean flag indicating whether VJ scaling coefficients at all 
                   levels have been retained (1= true) or not (0 = false) (boolean).

  Possible values for transform are:  DWT, MODWT.

SEE ALSO

   

[Structures] Structures/wtf_s

[top][parent]

NAME

   wtf_s -- wavelet transform filter struct.

DESCRIPTION

  wtf_s struct has fields:
   * g         -- scaling (low-pass) filter coefficients (vector).
   * h         -- wavelet (high-pass) filter coefficients (vector).
   * L         -- filter length (= number of coefficients) (integer).
   * Name      -- name of wavelet filter (character string).
   * Class     -- class of wavelet filters (character string).
   * Transform -- name of transform (character string).

  Possible values for transform are:  DWT, MODWT.

SEE ALSO

   

[Structures] WMTSA-DWT/Structures

[top]

NAME

   WMTSA DWT Structures -- structs used in WMTSA DWT toolbox.

DESCRIPTION

   MATLAB structures used in WMTSA DWT toolbox.

 TOOLBOX
    wmtsa/dwt

 CATEGORY

[Functions] wmtsa.dwt/dwt_scaling_transfer_function

[top]

NAME

   dwt_scaling_transfer_function -- Calculate transfer function for
     frequencies f for specified DWT scaling filter and (optionally) jth level.

 SYNOPSIS
   G_j = dwt_scaling_transfer_function(f, wtfname, [j])

INPUTS

   f            - vector of sinsuoidal frequency.
   wtfname      - name of a WMSTA-supported DWT scaling filter.
   j            - (optional) level (index) of scale.

OUTPUTS

   G            - vector of the transfer function values for DWT scaling filter h
                  at frequencies f.
   G_j          - vector of the transfer function values for DWT scaling filter h
                  at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page 76 of WMTSA for G.
   See page 97 of WMTSA for G_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/modwt_scaling_sgf

[top]

NAME

   modwt_scaling_sgf -- Calculate squared gain function for
     frequencies f for specified DWT scaling filter and (optionally) jth level.

 SYNOPSIS
   Gs_j = dwt_scaling_sgf(f, wtfname, [j])

INPUTS

   f            = vector of sinsuoidal frequency.
   wtfname      = name of a WMSTA-supported DWT scaling filter.
   j            = (optional) level (index) of scale.

OUTPUTS

   Gs           = vector of squared gain function values for DWT scaling filter h
                  at frequencies f.
   Gs_j         = vector of squared gain function values for DWT scaling filter h
                  at frequencies f at jth level.

SIDE EFFECTS


DESCRIPTION


EXAMPLE


NOTES


ALGORITHM

   See page  76 of WMTSA for Gs.
   See page 154 of WMTSA for Gs_j.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   dwt_scaling_transfer_function

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-10-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.dwt/dwt_functionality_tcase

[top]

NAME

   dwt_functionality_tcase -- munit test case to test dwt functionality.

USAGE

   run_tcase('dwt_functionality_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for dwt testcase.

DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-25

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] Tests.dwt/dwt_filter_tcase

[top]

NAME

   dwt_filter_tcase -- munit test case to test dwt_filter.

USAGE

   run_tcase('dwt_filter_tcase')

INPUTS


OUTPUTS

   tc            = tcase structure for dwt_filter testcase.

SIDE EFFECTS


DESCRIPTION


SEE ALSO

   dwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-03-01

COPYRIGHT

   (c) 2004, 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 615 $

[Functions] wmtsa.dwt/dwt_filter

[top]

NAME

   dwt_filter -- Define the DWT filter coefficients.

 SYNOPSIS
  [wtf] = dwt_filter(wtfname)

INPUTS

   * wtfname    -- name of wavelet transform filter (string, case-insenstive).

OUTPUTS

   * wtf        -- wavelet tranform filter struct (wtf_s).

SIDE EFFECTS

   wtfname is a valid wavelet filter name; otherwise error.

DESCRIPTION

   dwt_filter returns a wtf_s struct containing the DWT wavelet (high-pass)
   and scaling (low-pass) filter coefficients.

NOTES

   dwt_filter is deprecated by the wtfilter function.  dwt_filter is a
   pass thru to wtfilter and maintained for backward compatiablity and convenice.

   The wtf_s struct has fields:
   * g         -- scaling (low-pass) filter coefficients (vector).
   * h         -- wavelet (high-pass) filter coefficients (vector).
   * L         -- filter length (= number of coefficients) (integer).
   * name      -- name of wavelet filter (string).
   * wtfclass  -- class of wavelet filters (string).
   * transform -- name of transform (string).

   Typing dwt_filter('list') displays a list of supported filters.
 
   Typing dwt_filter('all') returns a struct array of wtf_s of all 
   supported filters.

ERRORS

   WMTSA:InvalidNumArguments

EXAMPLE

    [h, g, L, name] = dwt_filter('la8');

NOTES

   dwt_filter is a wrapper function around the wtfilter function.  

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   wtfilter, modwt_filter

 TOOLBOX
   wmtsa/dwt

 CATEGORY
   Filters: Filters

AUTHOR

   Charlie Cornish
   Brandon Whitcher

CREATION DATE

   2003-09-18

COPYRIGHT

   (c) Charles R. Cornish 2005

CREDITS

   Based on the original function (myfilter.m) by Brandon Whitcher.

REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/dwt_equivalent_filter

[top]

NAME

   dwt_equivalent_filter -- Calculate DWT equivalent filter for J levels.

 SYNOPSIS
   [hJ, gJ, LJ] = dwt_equivalent_filter(wtfname, J)

INPUTS

   wtfname      = string containing name of a WMTSA-supported wavelet filter,
                  case-insensitve.
   J            = number of levels (integer > 0)

OUTPUTS

   hJ           = 1xJ numeric cell array containing equivalent wavelet
                  filter coefficients.
   gJ           = 1xJ numeric cell array containing equivalent scaling
                  filter coefficients.
   LJ           = 1xJ numeric cell array containing widths of the
                  equivalent filters (L_j).

SIDE EFFECTS


DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-01-27

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt.dwt/dwt2vector

[top]

NAME

   dwt2vector -- Convert DWT coefficient cell array to vector representation.

 SYNOPSIS
   [W] = dwt2vector(WJ, VJ, att)

INPUTS

   * WJ         --  DWT wavelet coefficents 
                    (cell array of length J0 of NJ(:,1) x NChan matrices).
   * VJ         --  DWT scaling coefficents 
                    (cell array of length J0 of NJ(:,2) x NChan matrices).
   * att        --  structure containing DWT transform attributes.

OUTPUTS

   * W          -- vector of DWT coefficients.
                   (vector or cell array of vectors).

SIDE EFFECTS


DESCRIPTION


USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/dwt

[top]

NAME

   dwt -- Compute the (partial) discrete wavelet transform (DWT).

USAGE

   [W, V, att, NJ] = dwt(X, [wtf], [nlevels], [boundary], [{opts}])

INPUTS

   * X          -- set of observations 
                   (vector of length N or matrix of size N x Nchan)
   * wtf        -- (optional) wavelet transform filter name or struct 
                   (string, case-insensitve or wtf struct).
                   Default:  'la8'
   * nlevels    -- (optional) maximum level J0 (integer) 
                   or method of calculating J0 (character string).
                   Valid values: integer>0 or a valid method name
                   Default:  'conservative'
   * boundary   -- (optional) boundary conditions to use (character string)
                   Valid values: 'circular' or 'reflection'
                   Default: 'reflection'
   * opts       -- (optional) Additional function options.

OUTPUTS

   * WJ         --  DWT wavelet coefficents 
                    (cell array of length J0 of NJ(:,1) x NChan matrices).
   * VJ         --  DWT scaling coefficents 
                    (cell array of length J0 of NJ(:,2) x NChan matrices).
   * att        --  structure containing DWT transform attributes.
   * NJ         --  Jx2 matrix containing number of DWT wavelet (WJ)
                    and scaling (VJ) coefficients at each level j.

SIDE EFFECTS

   1.  wavelet is a WMTSA-supported DWT wavelet filter; otherwise error.

DESCRIPTION


EXAMPLE


WARNINGS


ERRORS


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 630 $

[Functions] wmtsa.signal/dhm

[top]

NAME

   dhm -- Generate simulation of stationary process using Davies-Harte method.

 SYNOPSIS
   Y_t = wmtsa_gen_stationary_process(s_X, Z)

INPUTS

   * s_X         -- ACVS of SDF of process (M lags, D deltas).
   * Z           -- N sets M IID Gaussian RVs.

OUTPUTS

   * Y_t         -- simulated time series.

SIDE EFFECTS


DESCRIPTION


USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.data/data_tsuite

[top]

NAME

   data_tsuite -- munit test suite to test data.

USAGE


INPUTS


OUTPUTS

   ts            = tsuite structure for data testsuite.

SIDE EFFECTS


DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-08-01

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/compare_struct_fieldvalues

[top]

NAME

   compare_struct_fieldvalues -- Compare two structs for match of fieldvalues.

 SYNOPSIS
   [tf, msg] = compare_struct_fieldvalues(s1, s2)
   [tf, msg] = compare_struct_fieldvalues(s1, s2, 'exact')
   [tf, msg] = compare_struct_fieldvalues(s1, s2, 'sorted')

INPUTS

   * s1         -- first struct to compare.
   * s2         -- second struct to compare.
   * match      -- type of match.
                   Possible values:  'exact', 'sorted'

OUTPUTS

   * tf          -- flag indicating whether structs' fieldvalues match (Boolean).
   * mismatches  -- list of fieldnames with mismatched values.

SIDE EFFECTS

   Function call requires a minimum of 2 input arguments; otherwise error.

DESCRIPTION

   compare_struct_filenames compares the fieldvalues in two structs.  

USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/compare_struct_fieldnames

[top]

NAME

   compare_struct_fieldnames -- Compare two structs for match of fieldnames.

 SYNOPSIS
   [tf, msg] = compare_struct_fieldnames(s1, s2)
   [tf, msg] = compare_struct_fieldnames(s1, s2, 'exact')
   [tf, msg] = compare_struct_fieldnames(s1, s2, 'sorted')

INPUTS

   * s1         -- first struct to compare.
   * s2         -- second struct to compare.
   * match      -- type of match.
                   Possible values:  'exact', 'sorted'

OUTPUTS

   * tf         -- flag indicating whether structs' fieldnames match (Boolean).
   * mismatches -- list of pairs of non-matching fieldnames (Nx2 cell array of strings).

SIDE EFFECTS

   Function call requires a minimum of 2 input arguments; otherwise error.

DESCRIPTION

   compare_struct_filenames compares the fieldnames in two structs.  

USAGE


WARNINGS


ERRORS


EXAMPLE


NOTES


BUGS


TODO


ALGORITHM


REFERENCES


SEE ALSO

 TOOLBOX


 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE


COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/columnize

[top]

NAME

   columnize -- Convert array in to a column vector.

 SYNOPSIS
   y = columnize(X)

INPUTS

   * X          -- an array.

OUTPUTS

   * y          -- column vector

DESCRIPTION

   columnize converts an array into a column vector.

 TOOLBOX
   utils

 CATEGORY

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-Sep-11

COPYRIGHT

   (c) 2005 Charles R. Cornish

 MATLAB VERSION
   7.0

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/colorspecname2rgb

[top]

NAME

   colorspecname2rgb -- Look up RGB value by ColorSpec name.

USAGE

   [rgb] = colorspecname2rgb(colorspecname)

INPUTS

   colorspecname - name of ColorSpec in specified format, in short or long
                   format.

OUTPUTS

   rbg          - three-element row vector whose elements specify the 
                  intensities of the red, green, and blue components of 
                  the color; the intensities must be in the range [0 1]. 

SIDE EFFECTS

   rgb must be RGB value for one of eight primary colors; otherwise error.

DESCRIPTION

   Funciton converts a ColorSpec name, in either short (single character)
   or long (single word) format into RGB 3-element vector to specifying
   its RGB value.

   Possible ColorSpec names:
     yellow
     magenta 
     cyan
     red
     green
     blue
     white
     black

SEE ALSO

   ColorSpec

 TOOLBOX
   wmtsa

 CATEGORY
   utils

AUTHOR

   Charlie Cornish

CREATION DATE

   2004-Apr-05

COPYRIGHT


CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.Tests.utils/argterr_tcase

[top]

NAME

   argterr_tcase -- munit test case to test argterr.

USAGE

   run_tcase(@argterr_tcase)

INPUTS


OUTPUTS

   tc            = tcase structure for argterr testcase.

SIDE EFFECTS


DESCRIPTION

AUTHOR

   Charlie Cornish

CREATION DATE

   2005-07-18

COPYRIGHT

   (c) 2005 Charles R. Cornish

CREDITS


REVISION

   $Revision: 612 $

[Functions] wmtsa.utils/argterr

[top]

NAME

   argterr - Check the data type and size of a function argument.

 SYNOPSIS
   [errmsg] = argterr(func, arg, type, [arg_size], [mode])
   [errmsg] = argterr(func, arg, type, [arg_size], [mode], [msg], 'string')
   [errstruct] = argterr(func, arg, type, [arg_size], [mode], [msg], 'struct')

INPUTS

   * func          -- checked function (string or function handle).
   * arg           -- the argument to check (object)
   * datatypes     -- expected data type(s) of the arg.
                      See verify_datatypes function for possibles datatypes to check.
                      (string or string cell array).
   * arg_size      -- (optional) expected size of array  (integer vector).
   * mode          -- (optional) output display mode (charcter string)
   * msg           -- (optional) message string to be displayed (string).
   * return_type   -- (optional) type of output argument (string).
                       'string' = return error message string (default).
                       'struct' = return error message struct.

OUTPUTS

   * errmsg        -- error message (string).
   * errstruct     -- error struct with fields:  message, identifier.

SIDE EFFECTS

   Function call requires a minimum of three input arguments; otherwise error.

DESCRIPTION

   argterr checks the data type(s) and optionally the size of an argument to a 
   function call.  If arg does not have the specified data type(s), an error
   message or error struct is returned.

   arg may be a single

   Possible values for 'datatypes' to check include:
   * 'posint'              -- All are positive integers --> integer value(s) > 0.
   * 'int0'                -- All are positive integers plus zero --> integer value(s) >= 0.
   * 'int','integer'       -- All are integers --> any integer value(s).
   * 'num','numeric'       -- All are numeric.
   * 'struct','structure'  -- Is a structure.
   * 'char','character','string' - Is a character string.
   * 'scalar               -- Is a point (size of all dimensions = 1).
   * 'vec','vector'        -- Is a vector (i.e. MxN, with M and/or N = 1).
   * 'nonsingleton','truevector'  -- Is a vector (i.e. MxN with M *or* N = 1).
   * 'row','rowvector'     -- Is a row vector (i.e. M x 1).
   * 'col','columnvector'  -- Is a column vector (i.e. 1 x N).
   * 'finite'              -- All are finite.
   * 'nonsparse'           -- Is a non-sparse matrix.
 
   The input argument 'mode' controls the display of diagnostic information
   to the consolue and has possible values:
   * 0 -- silent
   * 1 -- verbose
   The default value is 1 (silent).

EXAMPLE

   arg = [0 2];
     % arg is an integer.
   err = argterr('myfunction', arg, 'posint')
     % Result: err = 1
   err = argterr('myfunction', arg, 'int', [1 2], '')
     % Result: err = 0
   [err, errmsg] = argterr('myfunction', arg, {'int', 'vector'})
     % Result: err = 0

NOTES

   argterr is modelled after errargt, which is part of MATLAB wavelet toolkit.

SEE ALSO

   verify_datatype

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-06-22

COPYRIGHT

   (c) 2003, 2004, 2005 Charles R. Cornish

CREDITS

   argterr is inspired by the function errargt 
   by M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi
   which is part of the MATLAB wavelet toolkit.

 MATLAB VERSION
   7.0

REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/advance_wavelet_filter

[top]

NAME

   advance_wavelet_filter -- Calculate the advance of the wavelet filter at jth level for a given wavelet.

 SYNOPSIS
   nuHj = advance_wavelet_filter(wtfname, j)

INPUTS

   wtfname      = string containing name of WMTSA-supported wavelet filter.
   j            = jth level (index) of scale or a range of j levels of scales
                  (integer or Jx1 vector of integers).

OUTPUTS

   nuHj         = advance of wavelet filter at jth level
                  (integer or vector of integers).

SIDE EFFECTS

   wavelet is a WMTSA-supported wavelet filter; otherwise error.

DESCRIPTION


EXAMPLE


ALGORITHM

   nuHj = - (2^(j-1) * (L-1) + nu);

   For details, see equation 114b of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   advance_time_series_filter, dwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/advance_time_series_filter

[top]

NAME

   advance_time_series_filter -- Calculate the advance of the time series or filter for a given wavelet.

 SYNOPSIS
   nu = advance_time_series_filter(wtfname)

INPUTS

   wtfname      -  string containing name of WMTSA-supported wavelet filter.

OUTPUTS

   nu           -  advance of time series for specified wavelet filter.

SIDE EFFECTS

   wavelet is a WMTSA-supported wavelet filter; otherwise error.

DESCRIPTION


EXAMPLE


ALGORITHM

  For Least Asymmetric filters, equation 112e of WMTSA:
   nu =   -L/2 + 1,   for L/2 is even;
      =   -L/2,       for L = 10 or 18;
      =   -L/2 + 2,   for L = 14.  

  For Best Localized filter, page 119 of WMTSA.
   nu =   -5,         for L = 14;
      =   -11,        for L = 18;
      =   -9,         for L = 20.

  For Coiflet filters, page 124 and equation 124 of WMTSA:
   nu =   -2*L/3 + 1

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   dwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-08

COPYRIGHT


REVISION

   $Revision: 612 $

[Functions] wmtsa.dwt/advance_scaling_filter

[top]

NAME

   advance_scaling_filter -- Calculate the value to advance scaling filter at jth level for a given wavelet.

 SYNOPSIS
   nuGj = advance_scaling_filter(wtfname, level)

INPUTS

   wtfname      = string containing name of WMTSA-supported wavelet filter.
   j            = jth level (index) of scale or a range of j levels of scales
                  (integer or vector of integers).

OUTPUTS

   nuGj         = advance of scaling filter at specified levels.

SIDE EFFECTS

   wavelet is a WMTSA-supported scaling filter; otherwise error.

DESCRIPTION


EXAMPLE


ALGORITHM

   nuGj = (2^j - 1) * nu

   For details, see equation 114a of WMTSA.

REFERENCES

   Percival, D. B. and A. T. Walden (2000) Wavelet Methods for
     Time Series Analysis. Cambridge: Cambridge University Press.

SEE ALSO

   advance_time_series_filter, dwt_filter

AUTHOR

   Charlie Cornish

CREATION DATE

   2003-05-08

COPYRIGHT


REVISION

   $Revision: 612 $