function wav_con

% WAV_CON Show the help for the functions in this toolbox.

% This file is automatically generated.  Matthew Simoneau, 09-04-98
% Copyright (c) 1984-98 by The MathWorks, Inc. All Rights Reserved
% $Revision: 1.11 $ $Date: 1998/10/16 23:19:44 $

helpwin('wav_con/Contents');

function Contents
%MATLAB Tour Partial Function Help:  wav_con
%
%Double click on any function for more information
%
%  Wavelet Toolbox.
%  Version 1.2   (R11) 10-Jul-1998
% 
%  What's new.
%    Readme     - New features, bug fixes, and changes in this version.
%                 To display the Readme file for Version 1.2, type
%                 "whatsnew wavelet" in the MATLAB command window.
% 
%  Wavelet Toolbox GUI (Graphical User Interface).
%    wavemenu    - Launching point for the interactive Wavelet GUIs.
% 
%  Wavelets General.
%    biorfilt    - Biorthogonal wavelet filter set.
%    dyaddown    - Dyadic downsampling.
%    dyadup      - Dyadic upsampling.
%    intwave     - Integrate wavelet function psi.
%    orthfilt    - Orthogonal wavelet filter set.
%    qmf         - Quadrature mirror filter.
%    wavefun     - Wavelet and scaling functions.
%    wavemngr    - Wavelet manager. 
%    wfilters    - Wavelet filters.
%    wmaxlev     - Maximum wavelet decomposition level.
% 
%  Wavelet Families.
%    biorwavf    - Biorthogonal spline wavelet filters.
%    coifwavf    - Coiflets wavelet filters.
%    dbaux       - Daubechies wavelet filters computation.
%    dbwavf      - Daubechies wavelet filters.
%    gauswavf    - Gaussian wavelets.
%    mexihat     - Mexican hat wavelet.
%    meyer       - Meyer wavelet.
%    meyeraux    - Meyer wavelet auxiliary function.
%    morlet      - Morlet wavelet.
%    rbiowavf    - Reverse Biorthogonal spline wavelet filters.
%    symaux      - Symlets wavelet filters computation.
%    symwavf     - Symlets wavelet filters.
% 
%  Continuous Wavelet: 1-D.
%    cwt         - Continuous wavelet coefficients 1-D.
% 
%  Discrete Wavelets: 1-D.
%    appcoef     - Extract 1-D approximation coefficients.
%    detcoef     - Extract 1-D detail coefficients.
%    dwt         - Single-level discrete 1-D wavelet transform.
%    dwtper      - Single-level discrete 1-D wavelet transform (periodized).
%    dwtmode     - Discrete wavelet transform extension mode.
%    idwt        - Single-level inverse discrete 1-D wavelet transform.
%    idwtper     - Single-level inv. discrete 1-D wavelet transform (periodized).
%    upcoef      - Direct reconstruction from 1-D wavelet coefficients.
%    upwlev      - Single-level reconstruction of 1-D wavelet decomposition.
%    wavedec     - Multi-level 1-D wavelet decomposition.
%    waverec     - Multi-level 1-D wavelet reconstruction.
%    wrcoef      - Reconstruct single branch from 1-D wavelet coefficients.
% 
%  Discrete Wavelets: 2-D.
%    appcoef2    - Extract 2-D approximation coefficients.
%    detcoef2    - Extract 2-D detail coefficients.
%    dwt2        - Single-level discrete 2-D wavelet transform.
%    dwtper2     - Single-level discrete 2-D wavelet transform (periodized).
%    dwtmode     - Discrete wavelet transform extension mode.
%    idwt2       - Single-level inverse discrete 2-D wavelet transform.
%    idwtper2    - Single-level inv. discrete 2-D wavelet transform (periodized).
%    upcoef2     - Direct reconstruction from 2-D wavelet coefficients.
%    upwlev2     - Single-level reconstruction of 2-D wavelet decomposition.
%    wavedec2    - Multi-level 2-D wavelet decomposition.
%    waverec2    - Multi-level 2-D wavelet reconstruction.
%    wrcoef2     - Reconstruct single branch from 2-D wavelet coefficients.
% 
%  Wavelets Packets Algorithms.
%    besttree    - Best tree (wavelet packet).
%    bestlevt    - Best level tree (wavelet packet).
%    entrupd     - Entropy update (wavelet packet).
%    wentropy    - Entropy(wavelet packet).
%    wp2wtree    - Extract wavelet tree from wavelet packet tree.
%    wpcoef      - Wavelet packet coefficients.
%    wpcutree    - Cut wavelet packet tree.
%    wpdec       - Wavelet packet decomposition 1-D.
%    wpdec2      - Wavelet packet decomposition 2-D.
%    wpfun       - Wavelet packet functions.
%    wpjoin      - Recompose wavelet packet.
%    wprcoef     - Reconstruct wavelet packet coefficients.
%    wprec       - Wavelet packet reconstruction 1-D. 
%    wprec2      - Wavelet packet reconstruction 2-D.
%    wpsplt      - Split (decompose) wavelet packet.
% 
%  De-noising and Compression for Signals and Images.
%    ddencmp     - Default values for de-noising or compression.
%    thselect    - Threshold selection for de-noising.
%    wdcbm       - Wavelet 1-D deno. and comp. using Birge-Massart strategy.
%    wdcbm2      - Wavelet 2-D deno. and comp. using Birge-Massart strategy.
%    wden        - Automatic 1-D de-noising using wavelets.
%    wdencmp     - De-noising or compression using wavelets.
%    wnoise      - Generate noisy wavelet test data.
%    wnoisest    - Estimate noise of 1-D wavelet coefficients.
%    wpdencmp    - De-noising or compression using wavelet packet.
%    wpthcoef    - Wavelet packet coefficients thresholding.
%    wthcoef     - Wavelet coefficients thresholding 1-D.
%    wthcoef2    - Wavelet coefficients thresholding 2-D.
%    wthresh     - Perform soft or hard thresholding.
% 
%  Tree Management Utilities.
%    allnodes    - Tree nodes.
%    depo2ind    - Node depth-position to node index.
%    ind2depo    - Node index to node depth-position.
%    isnode      - True for existing node.
%    istnode     - True for terminal nodes.
%    leaves      - Terminal nodes.
%    maketree    - Make tree.
%    nodeasc     - Node ascendants.
%    nodedesc    - Node descendants.
%    nodejoin    - Recompose node.
%    nodepar     - Node parent.
%    nodesplt    - Split (decompose) node.
%    noleaves    - Not Terminal nodes.
%    ntnode      - Number of terminal nodes.
%    plottree    - Plot tree.
%    tnodes      - Terminal nodes.
%    treedpth    - Tree depth.
%    treeord     - Tree order.
%    wdatamgr    - Manager for data structure.
%    wtreemgr    - Manager for tree structure.
% 
%  Tree Utilities.
%    chgwname	- Change the name of wavelet in a WP data structure.
%    drawtree    - Draw Wavelet Packet Decomposition Tree (GUI).
%    readtree    - Read Wavelet Packet Decomposition from a figure.
% 
%  General Utilities.
%    deblankl    - Convert string to lowercase without blanks. 
%    errargn     - Check function arguments number.
%    errargt     - Check function arguments type.
%    num2mstr    - Convert number to string in maximum precision.
%    wcodemat    - Extended pseudocolor matrix scaling.
%    wcommon     - Find common elements.
%    wextend     - Extend a Vector or a Matrix.
%    wkeep       - Keep part of a vector or a matrix.
%    wrev        - Flip vector.
% 
%  Other.
%    instdfft    - Inverse non-standard 1-D fast Fourier transform.
%    nstdfft     - Non-standard 1-D fast Fourier transform.
% 
%  Wavelets Information.
%    waveinfo    - Information on wavelets.
% 
%  Demonstrations.
%    wavedemo    - Wavelet Toolbox demos.
% 
%-------------------------------------------
%
%  Wavelet Toolbox Demos.
% 
%  Demos.
%    wavedemo    - Wavelet toolbox demos.
% 
%

function Readme
%MATLAB Tour Partial Function Help:  wav_con
%
%  README file for the Wavelet Toolbox.
%  Version 1.2   (R11) 10-Jul-1998
% 
%  This file contains a list of enhancements and new features for
%  the Wavelet Toolbox Version 1.2.
% 
% 
%  ENHANCEMENTS
%  ~~~~~~~~~~~~
% 
%   1) EXTENSION MODE FOR DISCRETE WAVELET TRANSFORM
%      ---------------------------------------------- 
%      A) NEW EXTENSION MODES
%         ------------------- 
%         DWTMODE('zpd') sets the DWT mode to zero padding
%            (default mode).
% 
%         DWTMODE('sym') sets the DWT mode to symmetrization
%            (boundary value replication).
% 
%         DWTMODE('spd') (or DWTMODE('sp1')) sets the DWT mode
%            to smooth padding of order 1 (first derivative 
%            interpolation at the edges).
% 
%         DWTMODE('sp0') sets the DWT mode to smooth padding
%            of order 0 (constant extension at the edges).
% 
%         DWTMODE('ppd') sets the DWT mode to periodic padding.
%            (periodic extension at the edges).
% 
%         The five modes above are applicable for both 1-D
%         and 2-D extensions. The associated DWT is slightly  
%         redundant for an arbitrary length signal.
%         
%         The following mode sets the DWT to periodic.  This option 
%         produces the smallest wavelet decomposition.
%     
%         DWTMODE('per') sets the DWT mode to periodization.
%            (same results as the DWTPER and DWTPER2 functions)
% 
%         All functions that use the DWT (i.e. Discrete Wavelet
%         (1-D & 2-D) or Wavelet Packet (1-D & 2-D)) use the 
%         specified DWT extension MODE.  For example:
%         
%           Command Line:
%              APPCOEF, APPCOEF2, DETCOEF, DETCOEF2,
%              WAVEDEC, WAVEDEC2, WAVEREC, WAVEREC2,
%              WRCOEF,  WRCOEF2,  WPJOIN,  WPREC,
%              WPREC2
% 
%           GUI(via WAVEMENU):
%              Wavelet 1-D, Wavelet 2-D, Wavelet Packet 1-D, Wavelet Packet 2-D 
%        -------------------------------------------------------------
% 
%      B) CHANGING THE DEFAULT EXTENSION MODE
%         -----------------------------------
% 
%      The default mode for DWTMODE is 'zpd' (zero padding).
%      This default maybe changed.  The default mode is loaded 
%      from the file DWTMODE.DEF if it exists. If not, the file 
%      DWTMODE.CFG (in the "toolbox/wavelet/wavelet" directory) is used.
%      DWTMODE('save',mode) saves "mode" as new default mode
%      in the file DWTMODE.DEF (all the files named DWTMODE.DEF
%      are deleted before saving) DWTMODE('save') is equivalent to 
%      DWTMODE('save',currentMode).
%      ---------------------------------------------------------------
% 
%      C) USING EXTENSION MODE AS INPUT
%         -----------------------------
%       1-D functions
%       -------------
%         [CA,CD] = DWT(X,'wname','mode',mode) or
%         [CA,CD] = DWT(X,Lo_D,Hi_D,'mode',mode) computes the wavelet
%         decomposition and the extension mode can be specified.
%                       
%         X = IDWT(CA,CD,'wname','mode',mode) or
%         X = IDWT(CA,CD,Lo_R,Hi_R,'mode',mode) or
%         X = IDWT(CA,CD,'wname',L,'mode',mode) or
%         X = IDWT(CA,CD,Lo_R,Hi_R,L,'mode',mode) computes the
%         wavelet reconstruction and the extension mode can be
%         specified.             
% 
%       2-D functions
%       -------------
%         [CA,CH,CV,CD] = DWT2(X,'wname','mode',mode) or
%         [CA,CH,CV,CD] = DWT2(X,Lo_D,Hi_D,'mode',mode) computes the
%         wavelet decomposition and the extension mode can be
%         specified.          
% 
%         X = IDWT2(CA,CH,CV,CD,'wname','mode',mode) or
%         X = IDWT2CA,CH,CV,CD,Lo_R,Hi_R,'mode',mode) or
%         X = IDWT2(CA,CH,CV,CD,'wname',L,'mode',mode) or
%         X = IDWT2(CA,CH,CV,CD,Lo_R,Hi_R,L,'mode',mode) computes the
%         wavelet reconstruction and the extension mode can be
%         specified. 
%                     
%   2) NEW OPTIONS FOR IDWT and IDWT2
%      ------------------------------ 
%      X = IDWT(CA,[], ... ) returns the single-level
%      reconstructed approximation coefficients vector X
%      based on approximation coefficients vector CA.
% 
%      X = IDWT([],CD, ... ) returns the single-level
%      reconstructed detail coefficients vector X
%      based on detail coefficients vector CD.
% 
%      X = IDWT2(CA,[],[],[], ... ) returns the single-level
%      reconstructed approximation coefficients matrix X
%      based on approximation coefficients matrix CA.
% 
%      X = IDWT2([],CH,[],[], ... ) returns the single-level
%      reconstructed detail coefficients matrix X
%      based on horizontal detail coefficients matrix CH.
% 
%      The same result holds for X = IDWT2([],[],CV,[], ... ) and
%      X = IDWT2([],[],[],CD, ... )
% 
%   3) NEW VISUALIZATION MODE FOR WAVELET 1-D TOOL
%      -------------------------------------------
%      A new visualization mode is available for the Wavelet 1-D tool.
%      The 'Show and Scroll (Stem Cfs)' mode is very similar
%      to the 'Show and Scroll' mode, however it uses the STEM function
%      instead of IMAGE to display the coefficient values.
%      In this mode, the stems can be used in both the De-noising and
%      Compression tools.  
% 
%   4) MINOR ENHANCEMENTS TO THE FOLLOWING FUNCTIONS: 
%      ---------------------------------------------- 
%      WKEEP  -- Now allows you to specify where (Left, Central, Right) to 
%                extract the vector Y from X.
% 
%      WNOISE -- Now allows you to type in strings for the functions
% 
% 
%  NEW FEATURES
%  ~~~~~~~~~~~~
% 
%   1) NEW TOOL IN DYNAMIC VISUALIZATION
%      ----------------------------------
%      A new toggle button, "Zoom Axes", launches a palette for
%      viewing an axes in "full size."  Once selected a figure 
%      will appear and the push buttons will assume the position
%      (and relative size) of the axes on the current figure.
%      This functionality is particularly useful when the axes dimensions
%      are small, which happens often in compression and denoising.
% 
%   2) NEW WAVELET FAMILIES
%      --------------------
%        'sym'    : Symlets
%                   (now available from sym2 to sym45).
%        'rbio'   : Reverse Biorthogonal wavelets
%                   (Reverse Biorthogonal Wavelets based on 'bior').
%        'dmey'   : Discrete Meyer wavelet
%                   (FIR based approximation of the Meyer Wavelet).
%        'gaus'   : Gaussian wavelets
%                   (derivatives of the Gaussian  probability
%                    density function).
% 
%   3) NEW FUNCTIONS
%      -------------
%      Wavelet Packets
%      ---------------
%        LEAVES   -- returns the indices of terminal nodes of a tree
% 
%        NOLEAVES -- returns the indices of non terminal nodes of a tree
% 
%      Thresholds for wavelet 1-D & 2-D denoising and compression
%      --------------------------------------------------------------  
%        WDCBM  -- computes thresholds for wavelet 1-D denoising 
%                  or compression using Birge-Massart strategy.
% 
%        WDCBM2 --  computes thresholds for wavelet 2-D denoising 
%                   or compression using Birge-Massart strategy.
% 
%      General utilities
%      -----------------
%        WEXTEND -- Extends a Vector or a Matrix.

function wavemenu
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEMENU Launching point for the interactive Wavelet GUIs.
%    WAVEMENU launches a menu for accessing the various 
%    graphical tools provided in the Wavelet Toolbox.

function biorfilt
%MATLAB Tour Partial Function Help:  wav_con
%
% BIORFILT Biorthogonal wavelet filter set.
%    The BIORFILT command returns either four or eight filters
%    associated with biorthogonal wavelets.
% 
%    [LO_D,HI_D,LO_R,HI_R] = BIORFILT(DF,RF) computes four
%    filters associated with biorthogonal wavelet specified
%    by decomposition filter DF and reconstruction filter RF.
%    These filters are:
%    LO_D  Decomposition low-pass filter
%    HI_D  Decomposition high-pass filter
%    LO_R  Reconstruction low-pass filter
%    HI_R  Reconstruction high-pass filter
% 
%    [LO_D1,HI_D1,LO_R1,HI_R1,LO_D2,HI_D2,LO_R2,HI_R2] = 
%                        BIORFILT(DF,RF,'8')
%    returns eight filters, the first four associated with
%    the decomposition wavelet and the last four associated
%    with the reconstruction wavelet.
% 
%    

function dyaddown
%MATLAB Tour Partial Function Help:  wav_con
%
% DYADDOWN Dyadic downsampling.
%    Y = DYADDOWN(X,EVENODD), where X is a vector, returns
%    a version of X that has been downsampled by 2.
%    Whether Y contains the even- or odd-indexed samples
%    of X depends on the value of positive integer EVENODD:
%    If EVENODD is even, then Y(k) = X(2k).
%    If EVENODD is odd,  then Y(k) = X(2k-1).
% 
%    Y = DYADDOWN(X) is equivalent to Y = DYADDOWN(X,0)
% 
%    Y = DYADDOWN(X,EVENODD,'type') or 
%    Y = DYADDOWN(X,'type',EVENODD) where X is a matrix,
%    return a version of X obtained by suppressing columns
%    (or rows or both) if 'type' = 'c' (or 'r' or 'm'
%    respectively), according to the parameter EVENODD which
%    is as above.
% 
%    Y = DYADDOWN(X) is equivalent to
%    Y = DYADDOWN(X,0,'c').
%    Y = DYADDOWN(X,'type') is equivalent to
%    Y = DYADDOWN(X,0,'type').
%    Y = DYADDOWN(X,EVENODD) is equivalent to
%    Y = DYADDOWN(X,EVENODD,'c').
% 
%                   |1 2 3 4|                       |2 4|
%    Examples : X = |2 4 6 8|  ,  DYADDOWN(X,'c') = |4 8|
%                   |3 6 9 0|                       |6 0|
% 
%                        |1 2 3 4|                        |1 3|
%    DYADDOWN(X,'r',1) = |3 6 9 0|  , DYADDOWN(X,'m',1) = |3 9|
% 
%    

function dyadup
%MATLAB Tour Partial Function Help:  wav_con
%
% DYADUP Dyadic upsampling.
%    DYADUP implements a simple zero-padding scheme very
%    useful in the wavelet reconstruction algorithm.
% 
%    Y = DYADUP(X,EVENODD), where X is a vector, returns
%    an extended copy of vector X obtained by inserting zeros.
%    Whether the zeros are inserted as even- or odd-indexed
%    elements of Y depends on the value of positive integer
%    EVENODD:
%    If EVENODD is even, then Y(2k-1) = X(k), Y(2k) = 0.
%    If EVENODD is odd,  then Y(2k-1) = 0   , Y(2k) = X(k).
% 
%    Y = DYADUP(X) is equivalent to Y = DYADUP(X,1)
% 
%    Y = DYADUP(X,EVENODD,'type') or
%    Y = DYADUP(X,'type',EVENODD) where X is a matrix,
%    return extended copies of X obtained by inserting columns 
%    of zeros (or rows or both) if 'type' = 'c' (or 'r' or 'm'
%    respectively), according to the parameter EVENODD which
%    is as above.
% 
%    Y = DYADUP(X) is equivalent to
%    Y = DYADUP(X,1,'c')
%    Y = DYADUP(X,'type')  is equivalent to
%    Y = DYADUP(X,1,'type')
%    Y = DYADUP(X,EVENODD) is equivalent to
%    Y = DYADUP(X,EVENODD,'c') 
% 
%                   |1 2|                     |0 1 0 2 0|
%    Examples : X = |3 4|  ,  DYADUP(X,'c') = |0 3 0 4 0|
% 
%                      |1 2|                      |1 0 2|
%    DYADUP(X,'r',0) = |0 0|  , DYADUP(X,'m',0) = |0 0 0|
%                      |3 4|                      |3 0 4|
% 
%    

function intwave
%MATLAB Tour Partial Function Help:  wav_con
%
% INTWAVE Integrate wavelet function psi.
%    [INTEG,XVAL] = INTWAVE('wname',PREC) returns values of
%    the wavelet function psi integrals INTEG (from -inf to 
%    XVAL values).
%    The function psi is approximated on the 2^PREC
%    points grid XVAL, where PREC is a positive integer. 
%    'wname' is a string containing the name of the wavelet
%    (see WFILTERS).
% 
%    For biorthogonal wavelets:
%    [INTDEC,XVAL,INTREC] = INTWAVE('wname',PREC)
%    returns values of the wavelet decomposition
%    function psi_dec integrals INTDEC and the wavelet 
%    reconstruction function psi_rec integrals INTREC.
% 
%    INTWAVE('wname',PREC) is equivalent to
%    INTWAVE('wname',PREC,0).
%    INTWAVE('wname') is equivalent to INTWAVE('wname',8).
% 
%    When used with three arguments INTWAVE('wname',IN2,IN3),
%    PREC = MAX(IN2,IN3) and plots are given.
%    When IN2 is equal to the special value 0
%    INTWAVE('wname',0) is equivalent to
%    INTWAVE('wname',8,IN3).
%    INTWAVE('wname') is equivalent to INTWAVE('wname',8).
% 
%    

function orthfilt
%MATLAB Tour Partial Function Help:  wav_con
%
% ORTHFILT Orthogonal wavelet filter set.
%    [LO_D,HI_D,LO_R,HI_R] = ORTHFILT(W) computes the
%    four filters associated with the scaling filter W 
%    corresponding to a wavelet:
%    LO_D = decomposition low-pass filter
%    HI_D = decomposition high-pass filter
%    LO_R = reconstruction low-pass filter
%    HI_R = reconstruction high-pass filter.
% 
%    

function qmf
%MATLAB Tour Partial Function Help:  wav_con
%
% QMF    Quadrature mirror filter.
%    Y = QMF(X,P) changes the signs of the even index entries
%    of the reversed vector filter coefficients X if P is even.
%    If P is odd the same holds for odd index entries.
% 
%    Y = QMF(X) is equivalent to Y = QMF(X,0).

function wavefun
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEFUN Wavelet and scaling functions.
%    WAVEFUN returns approximations of the wavelet function
%    'wname' and the associated scaling function, if it exists.
%    The positive integer ITER is the number of iterations.
% 
%    For an orthogonal wavelet:
%    [PHI,PSI,XVAL] = WAVEFUN('wname',ITER)
%    returns the scaling and wavelet functions on the 2^ITER
%    points grid XVAL. 
% 
%    For a biorthogonal wavelet:
%    [PHI1,PSI1,PHI2,PSI2,XVAL] = WAVEFUN('wname',ITER)
%    returns the scaling and wavelet functions both
%    for decomposition (PHI1, PSI1) and for
%    reconstruction (PHI2, PSI2). 
% 
%    For a Meyer wavelet:
%    [PHI,PSI,XVAL] = WAVEFUN('wname',ITER)
% 
%    For a wavelet without scaling function (e.g. Morlet, 
%    Mexican Hat or Gaussian derivatives wavelets):
%    [PSI,XVAL] = WAVEFUN('wname',ITER) 
% 
%    WAVEFUN('wname',A,B), where A and B are positive integers,
%    is equivalent to WAVEFUN('wname',max(A,B)), and plots are
%    produced.
%    WAVEFUN('wname',0) is equivalent to WAVEFUN('wname',8,0).
%    WAVEFUN('wname')   is equivalent to WAVEFUN('wname',8).
%       
%    

function wavemngr
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEMNGR Wavelet manager.
%    WAVEMNGR is a wavelet manager used to create, add, 
%    delete, restore, or read wavelets into the toolbox.
% 
%    WAVEMNGR('create')
%    creates wavelets.inf MAT-file using wavelets.asc ASCII-file.
% 
%    WAVEMNGR('add',FN,FSN,WT,NUMS,FILE) or
%    WAVEMNGR('add',FN,FSN,WT,NUMS,FILE,B), adds a new wavelet family.
%      FN    = Family Name (string).
%      FSN   = Family Short Name (string).
%      WT    = Wavelet type : 1 , 2 , 3 , 4.
%      WT = 1 , orthogonal wavelets.
%      WT = 2 , biorthogonal wavelets.
%      WT = 3 , wavelet with scale function.
%      WT = 4 , wavelet without scale function.
%      NUMS  = String of numbers.
%      FILE  = MAT-file or M-file.
%      B     = [lb ub] lower and upper bounds of
%      effective support for wavelets of type = 3 or 4.
% 
%    WAVEMNGR('del',N), deletes a wavelet family.
%      N = Family Short Name or Wavelet Name (in the family).
% 
%    WAVEMNGR('restore') or WAVEMNGR('restore',IN2)
%    if nargin = 1 , the previous wavelets.asc is restored
%    otherwise the initial wavelets.asc is restored.
% 
%    OUT1 = WAVEMNGR('read')
%    OUT1 gives all wavelets families.
%  
%    OUT1 = WAVEMNGR('read',IN2)
%    OUT1 gives all wavelets.
% 
%    OUT1 = WAVEMNGR('read_asc')
%    reads wavelets.asc ASCII-file and
%    OUT1 gives all wavelets information.

function wfilters
%MATLAB Tour Partial Function Help:  wav_con
%
% WFILTERS Wavelet filters.
%    [LO_D,HI_D,LO_R,HI_R] = WFILTERS('wname') computes four
%    filters associated with the orthogonal or biorthogonal
%    wavelet named in the string 'wname'. 
%    The four output filters are:
%        LO_D, the decomposition low-pass filter
%        HI_D, the decomposition high-pass filter
%        LO_R, the reconstruction low-pass filter
%        HI_R, the reconstruction high-pass filter
%    Available wavelet names 'wname' are:
%    Daubechies: 'db1' or 'haar', 'db2', ... ,'db45'
%    Coiflets  : 'coif1', ... ,  'coif5'
%    Symlets   : 'sym2' , ... ,  'sym8', ... ,'sym45'
%    Biorthogonal:
%        'bior1.1', 'bior1.3' , 'bior1.5'
%        'bior2.2', 'bior2.4' , 'bior2.6', 'bior2.8'
%        'bior3.1', 'bior3.3' , 'bior3.5', 'bior3.7'
%        'bior3.9', 'bior4.4' , 'bior5.5', 'bior6.8'.
%    Reverse Biorthogonal: 
%        'rbio1.1', 'rbio1.3' , 'rbio1.5'
%        'rbio2.2', 'rbio2.4' , 'rbio2.6', 'rbio2.8'
%        'rbio3.1', 'rbio3.3' , 'rbio3.5', 'rbio3.7'
%        'rbio3.9', 'rbio4.4' , 'rbio5.5', 'rbio6.8'.
% 
%    [F1,F2] = WFILTERS('wname','type') returns the following
%    filters: 
%    LO_D and HI_D if 'type' = 'd' (Decomposition filters)
%    LO_R and HI_R if 'type' = 'r' (Reconstruction filters)
%    LO_D and LO_R if 'type' = 'l' (Low-pass filters)
%    HI_D and HI_R if 'type' = 'h' (High-pass filters)
% 
%    

function wmaxlev
%MATLAB Tour Partial Function Help:  wav_con
%
% WMAXLEV Maximum wavelet decomposition level.
%    WMAXLEV can help you avoid unreasonable maximum level value.
% 
%    L = WMAXLEV(S,'wname') returns the maximum level
%    decomposition of signal or image of size S using wavelet
%    named in the string 'wname' (see WFILTERS).
% 
%    WMAXLEV gives the maximum allowed level decomposition,
%    but in general, a smaller value is taken.
%    Usual values are 5 for the 1-D case and 3 for the 2-D case.
% 
%    

function biorwavf
%MATLAB Tour Partial Function Help:  wav_con
%
% BIORWAVF Biorthogonal spline wavelet filters.
%    [RF,DF] = BIORWAVF(W) returns two scaling filters
%    associated with biorthogonal wavelet specified
%    by the string W.
%    W = 'biorNr.Nd' where possible values for Nr and Nd are:
%    Nr = 1  Nd = 1 , 3 or 5
%    Nr = 2  Nd = 2 , 4 , 6 or 8
%    Nr = 3  Nd = 1 , 3 , 5 , 7 or 9
%    Nr = 4  Nd = 4
%    Nr = 5  Nd = 5
%    Nr = 6  Nd = 8
%    The output arguments are filters:
%    RF is the reconstruction filter
%    DF is the decomposition filter
% 
%    

function coifwavf
%MATLAB Tour Partial Function Help:  wav_con
%
% COIFWAVF Coiflets wavelet filters.
%    F = COIFWAVF(W) returns the scaling filter
%    associated with coiflet wavelet specified
%    by the string W, where W = 'coifN'.
%    Possible values for N are:
%       N = 1, 2, 3, 4 or 5.
% 
%    

function dbaux
%MATLAB Tour Partial Function Help:  wav_con
%
% DBAUX Daubechies wavelet filters computation.
%    W = DBAUX(N,SUMW) is the order N Daubechies scaling
%    filter such that SUM(W) = SUMW.
%    Possible values for N are:
%       N = 1, 2, 3, ...
%    Caution: Instability may occur when N is too large.
% 
%    W = DBAUX(N) is equivalent to W = DBAUX(N,1).
%    W = DBAUX(N,0) is equivalent to W = DBAUX(N,1).
% 
%    

function dbwavf
%MATLAB Tour Partial Function Help:  wav_con
%
% DBWAVF Daubechies wavelet filters.
%    F = DBWAVF(W) returns the scaling filter
%    associated with Daubechies wavelet specified
%    by the string W, where W = 'dbN'.
%    Possible values for N are:
%       N = 1, 2, 3, ... , 45.
% 
%    

function gauswavf
%MATLAB Tour Partial Function Help:  wav_con
%
% GAUSWAVF Gaussian wavelets.
%    [PSI,X] = GAUSWAVF(LB,UB,N,P) returns values of
%    the Pth derivative of the Gaussian function F = Cp*exp(-x^2)
%    on a N point regular grid for the interval [LB,UB],
%    where Cp is such that the 2-norm of the Pth derivative 
%    of F is equal to 1.
% 
%    Output arguments are the wavelet function PSI
%    computed on the grid X.
%    [PSI,X] = GAUSWAVF(LB,UB,N) is equivalent to
%    [PSI,X] = GAUSWAVF(LB,UB,N,1).
% 
%    These wavelets have [-5 5] as effective support.
% 
%    

function mexihat
%MATLAB Tour Partial Function Help:  wav_con
%
% MEXIHAT Mexican hat wavelet.
%    [PSI,X] = MEXIHAT(LB,UB,N) returns values of 
%    the Mexican hat wavelet on a N points regular
%    grid on the interval [LB,UB].
%    Output arguments are the wavelet function PSI
%    computed on the grid X, and the grid X.
% 
%    This wavelet has [-5 5] as effective support.
% 
%    

function meyer
%MATLAB Tour Partial Function Help:  wav_con
%
% MEYER Meyer wavelet.
%    [PHI,PSI,T] = MEYER(LOWB,UPPB,N) returns Meyer
%    wavelet and scaling functions evaluated on a N
%    regular grid on the interval [LOWB,UPPB].
%    Output arguments are the scaling function PHI, the
%    wavelet function PSI computed on the grid T.
%    These functions have [-8 8] as effective support.
% 
%    A fourth argument is allowed if only one function
%    is required:
%    [PHI,T] = MEYER(LOWB,UPPB,N,'phi')
%    [PSI,T] = MEYER(LOWB,UPPB,N,'psi')
%    when the fourth argument is used but not equal to
%    'phi' or 'psi', outputs are the same as in main option.
% 
%    N must be a power of two.
% 
%    

function meyeraux
%MATLAB Tour Partial Function Help:  wav_con
%
% MEYERAUX Meyer wavelet auxiliary function.
%    Y = MEYERAUX(X) returns values of the auxiliary
%    function used for Meyer wavelet generation evaluated
%    at the elements of the vector or matrix X.
% 
%    The function is 35*x^4 - 84*x^5 + 70*x^6 - 20*x^7.
% 
%    

function morlet
%MATLAB Tour Partial Function Help:  wav_con
%
% MORLET Morlet wavelet.
%    [PSI,X] = MORLET(LB,UB,N) returns values of 
%    the Morlet wavelet on a N points regular grid 
%    on the interval [LB,UB].
%    Output arguments are the wavelet function PSI
%    computed on the grid X, and the grid X.
% 
%    This wavelet has [-4 4] as effective support.
% 
%    

function rbiowavf
%MATLAB Tour Partial Function Help:  wav_con
%
% RBIOWAVF Reverse Biorthogonal spline wavelet filters.
%    [RF,DF] = RBIOWAVF(W) returns two scaling filters
%    associated with the biorthogonal wavelet specified
%    by the string W.
%    W = 'rbioNd.Nr' where possible values for Nd and Nr are:
%    Nd = 1  Nr = 1 , 3 or 5
%    Nd = 2  Nr = 2 , 4 , 6 or 8
%    Nd = 3  Nr = 1 , 3 , 5 , 7 or 9
%    Nd = 4  Nr = 4
%    Nd = 5  Nr = 5
%    Nd = 6  Nr = 8
%    The output arguments are filters:
%    RF is the reconstruction filter
%    DF is the decomposition filter

function symaux
%MATLAB Tour Partial Function Help:  wav_con
%
% SYMAUX Symlets wavelet filters computation.
%    The Symlets are the "least asymmetric"
%    Daubechies' wavelets.
%    W = SYMAUX(N,SUMW) is the order N Symlet scaling
%    filter such that SUM(W) = SUMW.
%    Possible values for N are:
%           N = 1, 2, 3, ...
%    Caution : Instability may occur when N is too large.
% 
%    W = SYMAUX(N) is equivalent to W = SYMAUX(N,1).
%    W = SYMAUX(N,0) is equivalent to W = SYMAUX(N,1).
% 
%    Reference: I. Daubechies, 
%    Ten lectures on wavelets, 
%    CBMS, SIAM, 61, 1994, 198-202 and 254-256.
% 
%    

function symwavf
%MATLAB Tour Partial Function Help:  wav_con
%
% SYMWAVF Symlets wavelet filters.
%    F = SYMWAVF(W)  returns the scaling filter
%    associated with the symlet wavelet specified
%    by the string W, where W = 'symN'.
%    Possible values for N are:
%       N = 2, 3, 4 ... 45.
% 
%    

function cwt
%MATLAB Tour Partial Function Help:  wav_con
%
% CWT Continuous wavelet coefficients 1-D.
%    COEFS = CWT(S,SCALES,'wname') computes the continuous
%    wavelet coefficients of the vector S at real, positive
%    SCALES, using wavelet whose name is 'wname'.
% 
%    COEFS = CWT(S,SCALES,'wname','plot') computes,
%    and in addition plots, the continuous wavelet
%    transform coefficients.
% 
%    COEFS = CWT(S,SCALES,'wname',PLOTMODE) computes, and
%    plots, the continuous wavelet transform coefficients.
%    Coefficients are colored using PLOTMODE.
%    PLOTMODE = 'lvl' (By scale) or 
%    PLOTMODE = 'glb' (All scales) or
%    PLOTMODE = 'abslvl' or 'lvlabs' (Absolute value and By scale) or
%    PLOTMODE = 'absglb' or 'glbabs' (Absolute value and All scales)
% 
%    CWT(...,'plot') is equivalent to CWT(...,'absglb')
% 
%    COEFS = CWT(S,SCALES,'wname',PLOTMODE,XLIM) computes, and
%    plots, the continuous wavelet transform coefficients.
%    Coefficients are colored using PLOTMODE using XLIM
%    XLIM = [L R] with 1<=L and R<=length(S).
% 
%    For each given scale a within the vector SCALES, the  
%    wavelet coefficients C(a,b) are computed for b = 1 to
%    ls = length(S) and are stored in COEFS(i,:)
%    if a = SCALES(i). 
%    Output argument COEFS is a la-by-ls matrix, where la 
%    is the length of SCALES.
% 
%    Examples of valid uses are:
%    t = linspace(-1,1,512);
%    s = 1-abs(t);
%    c = CWT(s,1:32,'meyr');
%    c = CWT(s,[64 32 16:-2:2],'morl');
%    c = CWT(s,[3 18 12.9 7 1.5],'db2');
% 
%    

function appcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% APPCOEF Extract 1-D approximation coefficients.
%    APPCOEF computes the approximation coefficients of a
%    one-dimensional signal.
% 
%    A = APPCOEF(C,L,'wname',N) computes the approximation
%    coefficients at level N using the wavelet decomposition
%    structure [C,L] (see WAVEDEC).
%    'wname' is a string containing the wavelet name.
%    Level N must be an integer such that 0 <= N <= length(L)-2. 
% 
%    A = APPCOEF(C,L,'wname') extracts the approximation
%    coefficients at the last level length(L)-2.
% 
%    Instead of giving the wavelet name, you can give the filters.
%    For A = APPCOEF(C,L,Lo_R,Hi_R) or
%    A = APPCOEF(C,L,Lo_R,Hi_R,N),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
%    
%    

function detcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% DETCOEF Extract 1-D detail coefficients.
%    D = DETCOEF(C,L,N) extracts the detail coefficients
%    at level N from the wavelet decomposition structure [C,L]
%    (see WAVEDEC).
%    Level N must be an integer such that 1 <= N <= length(L)-2.
% 
%    D = DETCOEF(C,L) extracts the detail coefficients
%    at last level n = length(L)-2. 
%    
%    

function dwt
%MATLAB Tour Partial Function Help:  wav_con
%
% DWT Single-level discrete 1-D wavelet transform.
%    DWT performs a single-level 1-D wavelet decomposition
%    with respect to either a particular wavelet ('wname',
%    see WFILTERS) or particular wavelet filters
%    (Lo_D and Hi_D) you specify.
% 
%    [CA,CD] = DWT(X,'wname') computes the approximation
%    coefficients vector CA and detail coefficients vector CD,
%    obtained by a wavelet decomposition of the vector X.
%    'wname' is a string containing the wavelet name.
% 
%    [CA,CD] = DWT(X,Lo_D,Hi_D) computes the wavelet decomposition
%    as above given these filters as input:
%    Lo_D is the decomposition low-pass filter and
%    Hi_D is the decomposition high-pass filter.
%    Lo_D and Hi_D must be the same length.
% 
%    If LX = length(X) and LF is the length of filters then
%    length(CA) = length(CD) = LA, where LA = CEIL(LX/2)
%    if the DWT extension mode is the periodized mode.
%    LA = FLOOR((LX+LF-1)/2) for the other extension modes.  
%    For the different signal extension modes, see DWTMODE. 
% 
%    [CA,CD] = DWT(X,'wname','mode',mode) or 
%    [CA,CD] = DWT(X,Lo_D,Hi_D,'mode',mode) computes the wavelet 
%    decomposition and the extension mode can be specified.
% 
%    

function dwtper
%MATLAB Tour Partial Function Help:  wav_con
%
% DWTPER Single-level discrete 1-D wavelet transform (periodized).
%    [CA,CD] = DWTPER(X,'wname') computes the approximation
%    coefficients vector CA and detail coefficients vector CD,
%    obtained by periodized wavelet decomposition of the 
%    vector X.
%    'wname' is a string containing the wavelet name
%    (see WFILTERS).
% 
%    Instead of giving the wavelet name, you can give
%    the filters. When used with three arguments: 
%    [CA,CD] = DWTPER(X,Lo_D,Hi_D),
%    Lo_D is the decomposition low-pass filter and
%    Hi_D is the decomposition high-pass filter.
% 
%    If lx = length(X) then
%        length(CA) = length(CD) = CEIL(lx/2).
% 
%    

function dwtmode
%MATLAB Tour Partial Function Help:  wav_con
%
% DWTMODE Discrete wavelet transform extension mode.
%    DWTMODE sets the signal or image extension mode for
%    discrete wavelet and wavelet packet transforms.
%    The extension modes represent different ways of handling
%    the problem of border distortion in the analysis.
% 
%    DWTMODE or DWTMODE('status') displays the current mode.
%    ST = DWTMODE or ST = DWTMODE('status') displays and
%    returns the current mode.
%    ST = DWTMODE('status','nodisp') returns the current mode
%    and does not display the text.
% 
%    DWTMODE('zpd') sets the DWT mode to zero padding
%       (default mode).
% 
%    DWTMODE('sym') sets the DWT mode to symmetrization
%       (boundary value replication).
% 
%    DWTMODE('spd') (or DWTMODE('sp1')) sets the DWT mode 
%       to smooth padding of order 1 (first derivative
%       interpolation at the edges).
% 
%    DWTMODE('sp0') sets the DWT mode to smooth padding
%       of order 0 (constant extension at the edges). 
% 
%    DWTMODE('ppd') sets the DWT mode to periodic padding.
%       (periodic extension at the edges).
% 
%    The five modes above are applicable for both 1-D
%    and 2-D extensions. The associated DWT is slightly  
%    redundant for an arbitrary length signal.
%         
%    The following mode sets the DWT to periodic.  This option 
%    produces the smallest wavelet decomposition.
% 
%    DWTMODE('per') sets the DWT mode to periodization.
%       (same results as the DWTPER and DWTPER2 functions)
% 
%    DWTMODE updates a global variable allowing for these
%    five signal extensions.  The extension mode should only 
%    be changed using this function; avoid changing the global 
%    variable directly.
% 
%    --------------------------------------------------------------
%    The default mode is loaded from the file DWTMODE.DEF
%    if it exists. If not, the file DWTMODE.CFG 
%    (in the "toolbox/wavelet/wavelet" directory) is used.
%    DWTMODE('save',mode) saves "mode" as new default mode
%    in the file DWTMODE.DEF (all the files named DWTMODE.DEF 
%    are deleted before saving).
%    DWTMODE('save') is equivalent to DWTMODE('save',currentMode).
%    --------------------------------------------------------------
% 
%    

function idwt
%MATLAB Tour Partial Function Help:  wav_con
%
% IDWT Single-level inverse discrete 1-D wavelet transform.
%    IDWT performs a single-level 1-D wavelet reconstruction
%    with respect to either a particular wavelet
%    ('wname', see WFILTERS) or particular wavelet
%    reconstruction filters (Lo_R and Hi_R) you specify.
% 
%    X = IDWT(CA,CD,'wname') returns the single-level
%    reconstructed approximation coefficients vector X
%    based on approximation and detail coefficients
%    vectors CA and CD, and using the wavelet 'wname'.
% 
%    X = IDWT(CA,CD,Lo_R,Hi_R) reconstructs as above,
%    using filters you specify:
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
%    Lo_R and Hi_R must be the same length.
% 
%    If LA = length(CA) = length(CD) and LF is the length
%    of the filters, then length(X) = LX, where LX = 2*LA
%    if the DWT extension mode is the periodized mode.
%    LX = 2*LA-LF+2 for the other extension modes.
%    For the different DWT extension modes, see DWTMODE. 
% 
%    X = IDWT(CA,CD,'wname',L) or X = IDWT(CA,CD,Lo_R,Hi_R,L)
%    return the length-L central portion of the result
%    obtained using IDWT(CA,CD,'wname'). L must be less than LX.
% 
%    X = IDWT(CA,CD,'wname','mode',mode) or 
%    X = IDWT(CA,CD,Lo_R,Hi_R,'mode',mode) or 
%    X = IDWT(CA,CD,'wname',L,'mode',mode) or 
%    X = IDWT(CA,CD,Lo_R,Hi_R,L,'mode',mode) computes the
%    wavelet reconstruction and the extension mode can be 
%    specified.
% 
%    X = IDWT(CA,[], ... ) returns the single-level
%    reconstructed approximation coefficients vector X
%    based on approximation coefficients vector CA.
%    
%    X = IDWT([],CD, ... ) returns the single-level
%    reconstructed detail coefficients vector X
%    based on detail coefficients vector CD.
%  
%    

function idwtper
%MATLAB Tour Partial Function Help:  wav_con
%
% IDWTPER Single-level inverse discrete 1-D wavelet transform (periodized).
%    X = IDWTPER(CA,CD,'wname') returns the single-level
%    reconstructed approximation coefficients vector X
%    based on approximation and detail vectors CA and CD
%    at a given level, using the periodized inverse wavelet
%    transform.
%    'wname' is a string containing the wavelet name (see WFILTERS).
% 
%    Instead of giving the wavelet name, you can give the filters.
%    For X = IDWTPER(CA,CD,Lo_R,Hi_R),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter
% 
%    If la = length(CA) = length(CD) then length(X) = 2*la.
% 
%    For X = IDWTPER(CA,CD,'wname',L) or 
%    X = IDWTPER(CA,CD,Lo_R,Hi_R,L), L is the length of
%    the result.
% 
%    

function upcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% UPCOEF Direct reconstruction from 1-D wavelet coefficients.
%    Y = UPCOEF(O,X,'wname',N) computes the N steps 
%    reconstructed coefficients of vector X. 'wname' is a
%    string containing the wavelet name.
%    N must be a strictly positive integer.
%    If O = 'a', approximation coefficients are reconstructed.
%    If O = 'd', detail coefficients are reconstructed.
% 
%    Y = UPCOEF(O,X,'wname',N,L) computes the N steps 
%    reconstructed coefficients of vector X and takes the 
%    length-L central portion of the result.
% 
%    Instead of giving the wavelet name, you can give the
%    filters.
%    For Y = UPCOEF(O,X,Lo_R,Hi_R,N) or 
%    Y = UPCOEF(O,X,Lo_R,Hi_R,N,L),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
% 
%    Y = UPCOEF(O,X,'wname') is equivalent to 
%    Y = UPCOEF(O,X,'wname',1).
% 
%    Y = UPCOEF(O,X,Lo_R,Hi_R) is equivalent to 
%    Y = UPCOEF(O,X,Lo_R,Hi_R,1).
% 
%    

function upwlev
%MATLAB Tour Partial Function Help:  wav_con
%
% UPWLEV Single-level reconstruction of 1-D wavelet decomposition.
%    [NC,NL,CA] = UPWLEV(C,L,'wname') performs the single-level
%    reconstruction of the wavelet decomposition structure
%    [C,L] giving the new one [NC,NL], and extract the last
%    approximation coefficients vector CA.
% 
%    [C,L] is a decomposition at level n = length(L)-2, so
%    [NC,NL] is the same decomposition at level n-1 and CA 
%    is the approximation coefficients vector at level n.
% 
%    'wname' is a string containing the wavelet name,
%    C is the original wavelet decomposition vector and
%    L the corresponding bookkeeping vector (for 
%    detailed storage information, see WAVEDEC).
% 
%    Instead of giving the wavelet name, you can give the
%    filters.
%    For [NC,NL,CA] = UPWLEV(C,L,Lo_R,Hi_R),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
% 
%    

function wavedec
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEDEC Multi-level 1-D wavelet decomposition.
%    WAVEDEC performs a multi-level 1-D wavelet analysis
%    using either a specific wavelet ('wname' see WFILTERS)
%    or specific wavelet decomposition filters.
% 
%    [C,L] = WAVEDEC(X,N,'wname') returns the wavelet
%    decomposition of the signal X at level N, using 'wname'.
% 
%    N must be a strictly positive integer (see WMAXLEV).
%    The output decomposition structure contains the wavelet
%    decomposition vector C and the bookkeeping vector L.
% 
%    For [C,L] = WAVEDEC(X,N,Lo_D,Hi_D),
%    Lo_D is the decomposition low-pass filter and
%    Hi_D is the decomposition high-pass filter.
% 
%    The structure is organized as:
%    C      = [app. coef.(N)|det. coef.(N)|... |det. coef.(1)]
%    L(1)   = length of app. coef.(N)
%    L(i)   = length of det. coef.(N-i+2) for i = 2,...,N+1
%    L(N+2) = length(X).
% 
%    

function waverec
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEREC Multi-level 1-D wavelet reconstruction.
%    WAVEREC performs a multi-level 1-D wavelet reconstruction
%    using either a specific wavelet ('wname', see WFILTERS) or
%    specific reconstruction filters (Lo_R and Hi_R).
% 
%    X = WAVEREC(C,L,'wname') reconstructs the signal X
%    based on the multi-level wavelet decomposition structure
%    [C,L] (see WAVEDEC).
% 
%    For X = WAVEREC(C,L,Lo_R,Hi_R),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
% 
%    

function wrcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% WRCOEF Reconstruct single branch from 1-D wavelet coefficients.
%    WRCOEF reconstructs the coefficients of a 1-D signal,
%    given a wavelet decomposition structure (C and L) and
%    either a specified wavelet ('wname', see WFILTERS) or 
%    specified reconstruction filters (Lo_R and Hi_R).
% 
%    X = WRCOEF('type',C,L,'wname',N) computes the vector of
%    reconstructed coefficients, based on the wavelet
%    decomposition structure [C,L] (see WAVEDEC), at level N.
%    'wname' is a string containing the name of wavelet.
%    Argument 'type' determines whether approximation
%    ('type' = 'a') or detail ('type' = 'd') coefficients are
%    reconstructed.
%    When 'type' = 'a', N is allowed to be 0, otherwise 
%    strictly positive N is required.
%    Level N must be an integer such that N <= length(L)-2. 
% 
%    X = WRCOEF('type',C,L,Lo_R,Hi_R,N) computes coefficient
%    as above, given the reconstruction you specify.
% 
%    X = WRCOEF('type',C,L,'wname') and
%    X = WRCOEF('type',C,L,Lo_R,Hi_R) reconstruct coefficients
%    of maximum level N = length(L)-2.
% 
%    

function appcoef2
%MATLAB Tour Partial Function Help:  wav_con
%
% APPCOEF2 Extract 2-D approximation coefficients.
%    APPCOEF2 computes the approximation coefficients of a
%    two-dimensional signal.
% 
%    A = APPCOEF2(C,S,'wname',N) computes the approximation
%    coefficients at level N using the wavelet decomposition
%    structure [C,S] (see WAVEDEC2). 
%    'wname' is a string containing the wavelet name.
%    Level N must be an integer such that 0 <= N <= size(S,1)-2. 
% 
%    A = APPCOEF2(C,S,'wname') extracts the approximation
%    coefficients at the last level size(S,1)-2.
% 
%    Instead of giving the wavelet name, you can give the filters.
%    For A = APPCOEF2(C,S,Lo_R,Hi_R) or 
%    A = APPCOEF2(C,S,Lo_R,Hi_R,N),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
%    
%    

function detcoef2
%MATLAB Tour Partial Function Help:  wav_con
%
% DETCOEF2 Extract 2-D detail coefficients.
%    D = DETCOEF2(O,C,S,N) extracts from the wavelet
%    decomposition structure [C,S] (see WAVEDEC2),
%    the horizontal, vertical or diagonal detail 
%    coefficients for O = 'h' (or 'v' or 'd',respectively),
%    at level N.
%    Level N must be an integer such that
%    1 <= N <= size(S,1)-2.
% 
%    

function dwt2
%MATLAB Tour Partial Function Help:  wav_con
%
% DWT2 Single-level discrete 2-D wavelet transform.
%    DWT2 performs a single-level 2-D wavelet decomposition
%    with respect to either a particular wavelet ('wname',
%    see WFILTERS) or particular wavelet filters
%    (Lo_D and Hi_D) you specify.
% 
%    [CA,CH,CV,CD] = DWT2(X,'wname') computes the approximation
%    coefficients matrix CA and details coefficients matrices 
%    CH, CV, CD, obtained by a wavelet decomposition of the 
%    input matrix X.
%    'wname' is a string containing the wavelet name.
% 
%    [CA,CH,CV,CD] = DWT2(X,Lo_D,Hi_D) computes the 2-D wavelet
%    decomposition as above given these filters as input:
%    Lo_D is the decomposition low-pass filter and
%    Hi_D is the decomposition high-pass filter.
%    Lo_D and Hi_D must be the same length.
% 
%    If SX = size(X) and LF is the length of filters then
%    size(CA) = size(CH) = size(CV) = size(CD) = SA where
%    SA = CEIL(SX/2) if the DWT extension mode is the
%    periodized mode. SA = FLOOR((SX+LF-1)/2) for the other
%    extension modes.  For the different DWT extension modes, 
%    see DWTMODE. 
% 
%    [CA,CH,CV,CD] = DWT2(X,'wname','mode',mode) or 
%    [CA,CH,CV,CD] = DWT2(X,Lo_D,Hi_D,'mode',mode) computes the  
%    wavelet decomposition and the extension mode can be 
%    specified.
% 
%    

function dwtper2
%MATLAB Tour Partial Function Help:  wav_con
%
% DWTPER2  Single-level discrete 2-D wavelet transform (periodized).
%    [CA,CH,CV,CD] = DWTPER2(X,'wname') computes the approximation
%    coefficients matrix CA and details coefficients matrices 
%    CH, CV, CD, obtained by periodized wavelet decomposition 
%    of the input matrix X.
%    'wname' is a string containing the wavelet name
%    (see WFILTERS).
% 
%    Instead of giving the wavelet name, you can give
%    the filters. When used with three arguments: 
%    [CA,CH,CV,CD] = DWTPER2(X,Lo_D,Hi_D),
%    Lo_D is the decomposition low-pass filter and
%    Hi_D is the decomposition high-pass filter.
% 
%    If sx = size(X) then
%       size(CA) = size(CH) = size(CV) = size(CD) = CEIL(sx/2).
% 
%    

function idwt2
%MATLAB Tour Partial Function Help:  wav_con
%
% IDWT2  Single-level inverse discrete 2-D wavelet transform.
%    IDWT2 performs a single-level 2-D wavelet reconstruction
%    with respect to either a particular wavelet
%    ('wname', see WFILTERS) or particular wavelet
%    reconstruction filters (Lo_R and Hi_R) you specify.
% 
%    X = IDWT2(CA,CH,CV,CD,'wname') uses the wavelet 'wname'
%    to compute the single-level reconstructed approximation
%    coefficients matrix X based on approximation matrix CA
%    and (horizontal, vertical, and diagonal) details matrices
%    CH, CV and CD.
% 
%    X = IDWT2(CA,CH,CV,CD,Lo_R,Hi_R) reconstructs as above,
%    using filters you specify:
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
%    Lo_R and Hi_R must be the same length.
% 
%    If SA = size(CA) = size(CH) = size(CV) = size(CD) and
%    LF is the length of the filters, then size(X) = SX where
%    SX = 2*SA if the DWT extension mode is the periodized
%    mode. SX = 2*SA-LF+2 for the other extension modes.
% 
%    X = IDWT2(CA,CH,CV,CD,'wname',S) and
%    X = IDWT2(CA,CH,CV,CD,Lo_R,Hi_R,S) return the size-S
%    central portion of the result obtained using
%    IDWT2(CA,CH,CV,CD,'wname'). S must be less than SX.
% 
%    X = IDWT2(CA,CH,CV,CD,'wname','mode',mode) or 
%    X = IDWT2CA,CH,CV,CD,Lo_R,Hi_R,'mode',mode) or 
%    X = IDWT2(CA,CH,CV,CD,'wname',L,'mode',mode) or 
%    X = IDWT2(CA,CH,CV,CD,Lo_R,Hi_R,L,'mode',mode) computes the
%    wavelet reconstruction and the extension mode can be 
%    specified.
% 
%    X = IDWT2(CA,[],[],[], ... ) returns the single-level
%    reconstructed approximation coefficients matrix X
%    based on approximation coefficients matrix CA.
%    
%    X = IDWT2([],CH,[],[], ... ) returns the single-level
%    reconstructed detail coefficients matrix X
%    based on horizontal detail coefficients matrix CH.
% 
%    The same result holds for X = IDWT2([],[],CV,[], ... ) and
%    X = IDWT2([],[],[],CD, ... )
% 
%    

function idwtper2
%MATLAB Tour Partial Function Help:  wav_con
%
% IDWTPER2 Single-level inverse discrete 2-D wavelet transform (periodized).
%    X = IDWTPER2(CA,CH,CV,CD,'wname') returns the single-level
%    reconstructed approximation coefficients matrix X based on
%    approximation and details matrices CA, CH, CV and CD at a 
%    given level, using the periodized inverse wavelet transform.
%    'wname' is a string containing the wavelet name (see WFILTERS).
% 
%    Instead of giving the wavelet name, you can give the filters.
%    For X = IDWTPER2(CA,CH,CV,CD,Lo_R,Hi_R), 
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter
% 
%    If sa = size(CA) = size(CH) = size(CV) = size(CD) then
%    size(X) = 2*sa.
% 
%    For X = IDWTPER2(CA,CH,CV,CD,'wname',S) or
%    X = IDWTPER2(CA,CH,CV,CD,Lo_R,Hi_R,S), S is the size of
%    the result.
% 
%    

function upcoef2
%MATLAB Tour Partial Function Help:  wav_con
%
% UPCOEF2 Direct reconstruction from 2-D wavelet coefficients.
%    Y = UPCOEF2(O,X,'wname',N,S) computes the N steps 
%    reconstructed coefficients of matrix X and takes the
%    size-S central portion of the result.
%    'wname' is a string containing the name of the wavelet.
%    If O = 'a', approximation coefficients are reconstructed,
%    otherwise if O = 'h' (or 'v' or 'd'), horizontal
%    (vertical or diagonal respectively),
%    detail coefficients are reconstructed.
%    N must be a strictly positive integer.
% 
%    Instead of giving the wavelet name, you can give the
%    filters.
%    For Y = UPCOEF2(O,X,Lo_R,Hi_R,N,S) 
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
%  
%    Y = UPCOEF2(O,X,'wname') is equivalent to
%    Y = UPCOEF2(O,X,'wname',1).
% 
%    Y = UPCOEF2(O,X,Lo_R,Hi_R) is equivalent to
%    Y = UPCOEF2(O,X,Lo_R,Hi_R,1).
% 
%    

function upwlev2
%MATLAB Tour Partial Function Help:  wav_con
%
% UPWLEV2 Single-level reconstruction of 2-D wavelet decomposition.
%    [NC,NS,CA] = UPWLEV2(C,S,'wname') performs the single-level
%    reconstruction of wavelet decomposition structure 
%    [C,S] giving the new one [NC,NS], and extract the last
%    approximation coefficients matrix CA.
% 
%    [C,S] is a decomposition at level n = size(S,1)-2, so
%    [NC,NS] is the same decomposition at level n-1 and CA 
%    is the approximation matrix at level n.
% 
%    'wname' is a string containing the wavelet name,
%    C is the original wavelet decomposition vector and
%    S the corresponding bookkeeping matrix (for 
%    detailed storage information, see WAVEDEC2).
% 
%    Instead of giving the wavelet name, you can give the
%    filters.
%    For [NC,NS,CA] = UPWLEV2(C,S,Lo_R,Hi_R),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
% 
%    

function wavedec2
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEDEC2 Multi-level 2-D wavelet decomposition.
%    [C,S] = WAVEDEC2(X,N,'wname') returns the wavelet
%    decomposition of the matrix X at level N, using the
%    wavelet named in string 'wname' (see WFILTERS).
%    Outputs are the decomposition vector C and the
%    corresponding bookkeeping matrix S.
%    N must be a strictly positive integer (see WMAXLEV).
% 
%    Instead of giving the wavelet name, you can give the
%    filters.
%    For [C,S] = WAVEDEC2(X,N,Lo_D,Hi_D),
%    Lo_D is the decomposition low-pass filter and
%    Hi_D is the decomposition high-pass filter.
% 
%    The output wavelet 2-D decomposition structure [C,S]
%    contains the wavelet decomposition vector C and the 
%    corresponding bookeeping matrix S. 
%    Vector C is organized as:
%      C = [ A(N)   | H(N)   | V(N)   | D(N) | ... 
%    H(N-1) | V(N-1) | D(N-1) | ...  | H(1) | V(1) | D(1) ].
%      where A, H, V, D, are row vectors such that: 
%    A = approximation coefficients, 
%    H = hori. detail coefficients,
%    V = vert. detail coefficients,
%    D = diag. detail coefficients,
%    each vector is the vector columnwise storage of a matrix. 
%    Matrix S is such that:
%      S(1,:) = size of app. coef.(N)
%      S(i,:) = size of det. coef.(N-i+2) for i = 2,...,N+1
%      and S(N+2,:) = size(X).
% 
%    

function waverec2
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEREC2  Multi-level 2-D wavelet reconstruction.
%    WAVEREC2 performs a multi-level 2-D wavelet reconstruction
%    using either a specific wavelet ('wname', see WFILTERS) or
%    specific reconstruction filters (Lo_R and Hi_R).
% 
%    X = WAVEREC2(C,S,'wname') reconstructs the matrix X
%    based on the multi-level wavelet decomposition structure
%    [C,S] (see WAVEDEC2).
% 
%    For X = WAVEREC2(C,S,Lo_R,Hi_R),
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter.
% 
%    

function wrcoef2
%MATLAB Tour Partial Function Help:  wav_con
%
% WRCOEF2 Reconstruct single branch from 2-D wavelet coefficients.
%    WRCOEF2 reconstructs the coefficients of an image.
% 
%    X = WRCOEF2('type',C,S,'wname',N) computes the matrix of
%    reconstructed coefficients of level N, based on the 
%    wavelet decomposition structure [C,S] (see WAVEDEC2).
%    'wname' is a string containing the name of the wavelet.
%    If 'type' = 'a', approximation coefficients are reconstructed
%    otherwise if 'type' = 'h' ('v' or 'd' respectively), 
%    horizontal (vert. or diag. respectively) detail coefficients
%    are reconstructed.
% 
%    Level N must be an integer such that:
%    0 <= N <= size(S,1)-2 if 'type' = 'a' and such that 
%    1 <= N <= size(S,1)-2 if 'type' = 'h', 'v'or 'd'.
% 
%    Instead of giving the wavelet name, you can give the filters.
%    For X = WRCOEF2('type',C,S,Lo_R,Hi_R,N),  
%    Lo_R is the reconstruction low-pass filter and
%    Hi_R is the reconstruction high-pass filter
% 
%    X = WRCOEF2('type',C,S,'wname') or
%    X = WRCOEF2('type',C,S,Lo_R,Hi_R) reconstructs 
%    coefficients of maximum level N = size(S,1)-2.
% 
%    

function besttree
%MATLAB Tour Partial Function Help:  wav_con
%
% BESTTREE Best tree (wavelet packet).
%    BESTTREE computes the optimal sub-tree of an initial tree
%    with respect to an entropy type criterion.
%    The resulting tree may be much smaller than the initial one.
% 
%    [T,D] = BESTTREE(T,D) computes the modified tree
%    structure T and data structure D, corresponding to
%    the best entropy value.
% 
%    [T,D,E] = BESTTREE(T,D) returns the best tree T,
%    data structure D and in addition, the best entropy value E.
% 
%    [T,D,E,N] = BESTTREE(T,D) returns the best tree T,
%    data structure D, entropy value E and in addition,
%    the vector N containing the indices of the merged nodes.
%  
%    

function bestlevt
%MATLAB Tour Partial Function Help:  wav_con
%
% BESTLEVT Best level tree (wavelet packet).
%    BESTLEVT computes the optimal complete sub-tree of an
%    initial tree with respect to an entropy type criterion.
%    The resulting complete tree may be of smaller depth
%    than the initial one.
% 
%    [T,D] = BESTLEVT(T,D) computes the modified tree
%    structure T and data structure D, corresponding to
%    the best level tree decomposition.
% 
%    [T,D,E] = BESTLEVT(T,D) returns best tree T,
%    data structure D and in addition, the best entropy value E.
% 
%    

function entrupd
%MATLAB Tour Partial Function Help:  wav_con
%
% ENTRUPD Entropy update (wavelet packet).
%    NDATA = ENTRUPD(TREE,DATA,ENT) or 
%    NDATA = ENTRUPD(TREE,DATA,ENT,PAR) returns for a
%    given wavelet packet decomposition structure
%    [TREE,DATA] (see MAKETREE), the updated data structure
%    NDATA corresponding to entropy function ENT with
%    optional parameter PAR (see WENTROPY).
% 
%    [TREE,NDATA] is the resulting decomposition structure.
% 
%    

function wentropy
%MATLAB Tour Partial Function Help:  wav_con
%
% WENTROPY Entropy(wavelet packet).
%    E = WENTROPY(X,T,P) returns the entropy E of the
%    vector or matrix X. 
%    In both cases, output E is a real number.
% 
%    T is a string containing the type of entropy:
%      T = 'shannon', 'threshold', 'norm',
%      'log energy' (or 'logenergy'), 'sure', 'user'.
% 
%    P is an optional parameter depending on T value:
%      If T = 'shannon' or 'log energy', P is not used.
%      If T = 'threshold' or 'sure', P is the
%      threshold and must a positive number.
%      If T = 'norm', P is the power and must be such
%      that 1 <= P.
%      If T = 'user', P is a string containing
%      the M-file name of your own entropy
%      function, with a single input X.
% 
%    E = WENTROPY(X,T) is equivalent to E = WENTROPY(X,T,0).

function wp2wtree
%MATLAB Tour Partial Function Help:  wav_con
%
% WP2WTREE Extract wavelet tree from wavelet packet tree.
%    [T,D] = WP2WTREE(T,D) computes the modified tree
%    structure T and data structure D (see MAKETREE),
%    corresponding to the wavelet decomposition tree.
% 
%    

function wpcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% WPCOEF Wavelet packet coefficients.
%    X = WPCOEF(S,D,N) returns the coefficients associated
%    with the node N. S is the tree structure and D
%    the data structure (see MAKETREE).
%    If N doesn't exist, X = [];
% 
%    X = WPCOEF(S,D) is equivalent to X = WPCOEF(S,D,0) 
% 
%    

function wpcutree
%MATLAB Tour Partial Function Help:  wav_con
%
% WPCUTREE Cut wavelet packet tree.
%    [T,D] = WPCUTREE(T,D,L) cuts the tree T at level L
%    and computes the corresponding data structure D
%    (see MAKETREE).
% 
%    [T,D,RN] = WPCUTREE(T,D,L) returns the same arguments
%    as above and in addition, the vector RN contains
%    the indices of the reconstructed nodes.
% 
%    

function wpdec
%MATLAB Tour Partial Function Help:  wav_con
%
% WPDEC Wavelet packet decomposition 1-D.
%    [T,D] = WPDEC(X,N,'wname',E,P) returns a tree structure T
%    and a data structure D (see MAKETREE), corresponding to a
%    wavelet packet decomposition of the vector X, at level N,
%    with a particular wavelet ('wname', see WFILTERS).
%    E is a string containing the type of entropy (see WENTROPY):
%    E = 'shannon', 'threshold', 'norm', 'log energy', 'user'
%    P is an optional parameter:
%     'shannon' or 'log energy' : P is not used
%     'threshold' or 'sure'     : P is the threshold (0 <= P)
%     'norm' : P is a power (1 <= P < 2)
%     'user' : P is a string containing the name
%              of an user-defined function.
% 
%    [T,D] = WPDEC(X,N,'wname') is equivalent to
%    [T,D] = WPDEC(X,N,'wname','shannon').
% 
%    

function wpdec2
%MATLAB Tour Partial Function Help:  wav_con
%
% WPDEC2 Wavelet packet decomposition 2-D.
%    [T,D] = WPDEC2(X,N,'wname',E,P) returns a tree structure T
%    and a data structure D (see MAKETREE), corresponding to a
%    wavelet packet decomposition of the matrix X, at level N,
%    with a particular wavelet ('wname', see WFILTERS).
%    E is a string containing the type of entropy
%    (see WENTROPY):
%    E = 'shannon', 'threshold', 'norm', 'log energy', 'sure',
%    'user'
%    P is an optional parameter:
%     'shannon' or 'log energy' : P is not used
%     'threshold' or 'sure'     : P is the threshold (0 <= P)
%     'norm' : P is a power (1 <= P < 2)
%     'user' : P is a string containing the name
%              of an user-defined function.
% 
%    [T,D] = WPDEC2(X,N,'wname') is equivalent to
%    [T,D] = WPDEC2(X,N,'wname','shannon').
% 
%    

function wpfun
%MATLAB Tour Partial Function Help:  wav_con
%
% WPFUN Wavelet packet functions.
%    [WPWS,X] = WPFUN('wname',NUM,PREC) computes the
%    wavelets packets for a wavelet 'wname' (see WFILTERS),
%    on dyadic intervals of length 1/2^PREC. PREC must be
%    a positive integer.
%    Output matrix WPWS contains the W functions of index
%    from 0 to NUM, stored rowwise as [W0; W1;...; Wnum].
%    Output vector X is the corresponding common X-grid 
%    vector.
% 
%    [WPWS,X] = WPFUN('wname',NUM) is equivalent to
%    [WPWS,X] = WPFUN('wname',NUM,7).
% 
%    

function wpjoin
%MATLAB Tour Partial Function Help:  wav_con
%
% WPJOIN Recompose wavelet packet.
%    WPJOIN updates the tree and data structures after the
%    recomposition of a node.
% 
%    [T,D] = WPJOIN(T,D,N) returns the modified tree
%    structure T and the modified data structure D, (see
%    MAKETREE) corresponding to a recomposition of the node N.
%    [T,D,X] = WPJOIN(T,D,N) also returns the coefficients
%    of the node.
% 
%    [T,D] = WPJOIN(T,D) is equivalent to
%    [T,D] = WPJOIN(T,D,0).
%    
%    [T,D,X] = WPJOIN(T,D) is equivalent to
%    [T,D,X] = WPJOIN(T,D,0).
% 
%    

function wprcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% WPRCOEF Reconstruct wavelet packet coefficients.
%    X = WPRCOEF(T,D,N) computes reconstructed coefficients
%    of the node N. T is the tree structure and D
%    the data structure (see MAKETREE).
% 
%    X = WPRCOEF(T,D) is equivalent to X = WPRCOEF(T,D,0).
% 
%    

function wprec
%MATLAB Tour Partial Function Help:  wav_con
%
% WPREC Wavelet packet reconstruction 1-D.
%    X = WPREC(T,D) returns the reconstructed vector
%    corresponding to a wavelet packet decomposition
%    structure [T,D] (see MAKETREE).
% 
%    T is the tree structure and D the data structure.
% 
%    

function wprec2
%MATLAB Tour Partial Function Help:  wav_con
%
% WPREC2 Wavelet packet reconstruction 2-D.
%    X = WPREC2(T,D) returns the reconstructed matrix
%    X corresponding to a wavelet packet decomposition
%    structure [T,D] (see MAKETREE).
% 
%    T is the tree structure and D the data structure. 
% 
%    

function wpsplt
%MATLAB Tour Partial Function Help:  wav_con
%
% WPSPLT Split (decompose) wavelet packet.
%    WPSPLT updates the tree and data structures after the
%    decomposition of a node.
% 
%    [T,D] = WPSPLT(T,D,N) returns the modified tree
%    structure T and the modified data structure D (see
%    MAKETREE), corresponding to the decomposition of the
%    node N.
% 
%    For a 1-D decomposition: [T,D,CA,CD] = WPSPLT(T,D,N)
%    with CA = approximation and CD = detail of node N.
% 
%    For a 2-D decomposition: [T,D,CA,CH,CV,CD] = WPSPLT(T,D,N)
%    with CA = approximation and CH, CV, CD = (Horiz., Vert. and
%    Diag.) details of node N.
% 
%    

function ddencmp
%MATLAB Tour Partial Function Help:  wav_con
%
% DDENCMP Default values for de-noising or compression.
%    [THR,SORH,KEEPAPP,CRIT] = DDENCMP(IN1,IN2,X)
%    returns default values for de-noising or compression,
%    using wavelets or wavelet packets, of an input vector
%    or matrix X which can be a 1-D or 2-D signal.
%    THR is the threshold, SORH is for soft or hard
%    thresholding, KEEPAPP allows you to keep approximation
%    coefficients, and CRIT (used only for wavelet packets)
%    is the entropy name (see WENTROPY).
%    IN1 is 'den' or'cmp' and IN2 is 'wv' or 'wp'.
% 
%    For wavelets (three output arguments):
%    [THR,SORH,KEEPAPP] = DDENCMP(IN1,'wv',X) 
%    returns default values for de-noising (if IN1 = 'den')
%    or compression (if IN1 = 'cmp') of X.
%    These values can be used for WDENCMP.
% 
%    For wavelet packets (four output arguments):
%    [THR,SORH,KEEPAPP,CRIT] = DDENCMP(IN1,'wp',X) 
%    returns default values de-noising (if IN1 = 'den')
%    or compression (if IN1 = 'cmp') of X.
%    These values can be used for WPDENCMP.
% 
%    

function thselect
%MATLAB Tour Partial Function Help:  wav_con
%
% THSELECT Threshold selection for de-noising.
%    THR = THSELECT(X,TPTR) returns threshold X-adapted value 
%    using selection rule defined by string TPTR.
%    
%    Available selection rules are:
%    TPTR = 'rigrsure', adaptive threshold selection using 
%        principle of Stein's Unbiased Risk Estimate.
%    TPTR = 'heursure', heuristic variant of the first option.
%    TPTR = 'sqtwolog', threshold is sqrt(2*log(length(X))).
%    TPTR = 'minimaxi', minimax thresholding.
% 
%    Threshold selection rules are based on the underlying 
%    model y = f(t) + e where e is a white noise N(0,1).
%    Dealing with unscaled or nonwhite noise can be handled
%    using rescaling output threshold THR (see SCAL parameter
%    in WDEN).
% 
%    

function wdcbm
%MATLAB Tour Partial Function Help:  wav_con
%
% WDCBM Thresholds for wavelet 1D denoising or compression using
%       Birge-Massart strategy.
%    [THR,NKEEP] = WDCBM(C,L,ALPHA,M) returns level-dependent 
%    thresholds THR and numbers of coefficients to be kept NKEEP,
%    for denoising or compression obtained by wavelet coefficients
%    selection rule using Birge-Massart strategy.
% 
%    [C,L] is the wavelet decomposition structure of the signal
%    to be denoised or compressed, at level J0 = length(L)-2.
%    ALPHA must be a real greater than 1. Typically ALPHA = 1.5 for 
%    compression and ALPHA = 3 for denoising. 
%    M is a positive integer, typically M = L(1)/2 the length of
%    coarsest approximation coefficients over 2.
% 
%    THR is a vector of length J0, THR(:,I) contains the 
%    threshold for level I.
%    NKEEP is a vector of length J0, NKEEP(:,I) 
%    contains the number of coefficients to be kept at level I.
% 
%    With respect to Birge-Massart paper J0 becomes J0+1.     
%    J0, M and ALPHA define the strategy:
%    - at level J0+1 (and coarser levels), everything is kept.
%    - for level j from 1 to J0, the nj larger coefficients
%    are kept with nj = M/(J0+1-j)^ALPHA. 
%    M is a tuning parameter (see default value).
% 
%    WDCBM(C,L,ALPHA) is equivalent to WDCBM(C,L,ALPHA,L(1)/2). 
% 
%     Reference: L. Birge, P. Massart, "From model selection to
%     adaptive estimation", in Festschrift for Lucien Le Cam,
%     D. Pollard, E. Torgersen, G.L. Yang editors, Springer, 
%     1997, p. 55-87
%     
%    

function wdcbm2
%MATLAB Tour Partial Function Help:  wav_con
%
% WDCBM2 Thresholds for wavelet 2D denoising or compression
%        using Birge-Massart strategy.
%    [THR,NKEEP] = WDCBM2(C,S,ALPHA,M) returns level-dependent 
%    thresholds THR and numbers of coefficients to be kept NKEEP,
%    for denoising or compression obtained by wavelet coefficients
%    selection rule using Birge-Massart strategy.
% 
%    [C,S] is the wavelet decomposition structure of the image
%    to be denoised or compressed, at level J0 = size(S,1)-2.
%    ALPHA must be a real greater than 1. Typically ALPHA = 1.5 for 
%    compression and ALPHA = 3 for denoising. 
%    M is a positive integer, typically M = 3*prod(S(1,:))/4 the 
%    length of detail coefficients at level J0+1.
% 
%    THR is a matrix 3 by J0, THR(:,I) contains the level
%    dependent thresholds in the three orientations
%    horizontal, diagonal and vertical, for level I.
%    NKEEP is a vector of length J0, NKEEP(:,I) 
%    contains the number of coefficients to be kept at level I. 
% 
%    With respect to Birge-Massart paper J0 becomes J0+1.     
%    J0, M and ALPHA define the strategy:
%    - at level J0+1 (and coarser levels), everything is kept.
%    - for level j from 1 to J0, the nj larger coefficients
%    are kept with nj = M/(J0+1-j)^ALPHA. 
%    M is a tuning parameter (see default value).
% 
%    WDCBM2(C,L,ALPHA) is equivalent to 
%    WDCBM2(C,L,ALPHA,3*PROD(S(1,:))/4). 
% 
%     Reference: L. Birge, P. Massart, "From model selection to
%     adaptive estimation", in Festschrift for Lucien Le Cam,
%     D. Pollard, E. Torgersen, G.L. Yang editors, Springer, 
%     1997, p. 55-87
%     
%    

function wden
%MATLAB Tour Partial Function Help:  wav_con
%
% WDEN Automatic 1-D de-noising using wavelets.
%    WDEN performs an automatic de-noising process of a 1-D
%    signal using wavelets.
% 
%    [XD,CXD,LXD] = WDEN(X,TPTR,SORH,SCAL,N,'wname') returns 
%    a de-noised version XD of input signal X obtained by 
%    thresholding the wavelet coefficients. 
%    Additional output arguments [CXD,LXD] are the wavelet 
%    decomposition structure of de-noised signal XD.
% 
%    TPTR string contains threshold selection rule:
%    'rigrsure' use principle of Stein's Unbiased Risk.
%    'heursure' is an heuristic variant of the first option.
%    'sqtwolog' for universal threshold sqrt(2*log(.)).
%    'minimaxi' for minimax thresholding.
%        (see THSELECT for more details).
%    SORH ('s' or 'h') is for soft or hard thresholding
%        (see WTHRESH for more details).
%    SCAL defines multiplicative threshold rescaling:
%      'one' for no rescaling.
%      'sln' for rescaling using a single estimation 
%        of level noise based on first level coefficients.
%      'mln' for rescaling done using level dependent
%        estimation of level noise.
%    Wavelet decomposition is performed at level N and 'wname'
%    is a string containing the name of desired orthogonal
%    wavelet.
% 
%    [XD,CXD,LXD] = WDEN(C,L,TPTR,SORH,SCAL,N,'wname') returns 
%    same output arguments, using the same options as above, but 
%    obtained directly from the input wavelet decomposition 
%    structure [C,L] of the signal to be de-noised, at level N
%    and using 'wname' orthogonal wavelet.
% 
%    

function wdencmp
%MATLAB Tour Partial Function Help:  wav_con
%
% WDENCMP De-noising or compression using wavelets.
%    WDENCMP performs a de-noising or compression process
%    of a signal or an image using wavelets.
% 
%    [XC,CXC,LXC,PERF0,PERFL2] = 
%    WDENCMP('gbl',X,'wname',N,THR,SORH,KEEPAPP)
%    returns a de-noised or compressed version XC of input
%    signal X (1-D or 2-D) obtained by wavelet coefficients
%    thresholding using global positive threshold THR.
%    Additional output arguments [CXC,LXC] are the
%    wavelet decomposition structure of XC, 
%    PERFL2 and PERF0 are L^2 recovery and compression
%    scores in percentages.
%    PERFL2 = 100*(vector-norm of CXC/vector-norm of C)^2
%    where [C,L] denotes the wavelet decomposition structure
%    of X.
%    Wavelet decomposition is performed at level N and
%    'wname' is a string containing the wavelet name.
%    SORH ('s' or 'h') is for soft or hard thresholding
%    (see WTHRESH for more details).
%    If KEEPAPP = 1, approximation coefficients cannot be
%    thresholded, otherwise it is possible.
% 
%    WDENCMP('gbl',C,L,W,N,THR,SORH,KEEPAPP)
%    has the same output arguments, using the same
%    options as above, but obtained directly from the
%    input wavelet decomposition structure [C,L] of the
%    signal to be de-noised or compressed, at level N,
%    using  'wname' wavelet.
% 
%    For 1-D case and 'lvd' option:
%    WDENCMP('lvd',X, 'wname',N,THR,SORH) or
%    WDENCMP('lvd',C,L, 'wname',N,THR,SORH)
%    have the same output arguments, using the same
%    options as above, but allowing level-dependent
%    thresholds contained in vector THR (THR must be of
%    length N). In addition, the approximation is kept.
% 
%    For 2-D case and 'lvd' option:
%    WDENCMP('lvd',X, 'wname',N,THR,SORH) or
%    WDENCMP('lvd',C,L, 'wname',N,THR,SORH)
%    THR must be a matrix 3 by N containing the level
%    dependent thresholds in the three orientations
%    horizontal, diagonal and vertical.
% 
%    

function wnoise
%MATLAB Tour Partial Function Help:  wav_con
%
% WNOISE Generate noisy wavelet test data.
%    X = WNOISE(FUN,N) returns values of test function 
%    given by FUN, on a 2^N sample of [0,1].
% 
%    [X,XN] = WNOISE(FUN,N,SNRAT) returns the previous vector X
%    rescaled such that std(x) = SNRAT, 
%    and in vector XN the values of vector X corrupted by an
%    additive Gaussian white noise N(0,1), then XN has a
%    signal-to-noise ratio of SNRAT.
% 
%    [X,XN] = WNOISE(FUN,N,SNRAT,INIT) returns previous
%    vector X and XN, but the generator seed is set to INIT
%    value. 
% 
%    The six functions below are based on: D. Donoho and I. Johnstone 
%    in "Adapting to unknown smoothness via wavelet shrinkage"
%    Preprint Stanford, January 93, p 27-28.
%    FUN = 1 or FUN = 'blocks'     
%    FUN = 2 or FUN = 'bumps'      
%    FUN = 3 or FUN = 'heavy sine'   
%    FUN = 4 or FUN = 'doppler'   
%    FUN = 5 or FUN = 'quadchirp'   
%    FUN = 6 or FUN = 'mishmash'   

function wnoisest
%MATLAB Tour Partial Function Help:  wav_con
%
% WNOISEST Estimate noise of 1-D wavelet coefficients.
%    STDC = WNOISEST(C,L,S) returns estimates of detail
%    coefficients standard deviation for levels contained 
%    in input vector S.
%    [C,L] is the input wavelet decomposition structure
%    (see WAVEDEC).
% 
%    The estimator used is Median Absolute Deviation / 0.6745,
%    well suited for zero mean Gaussian white noise in
%    de-noising 1-D model (see THSELECT).
% 
%    

function wpdencmp
%MATLAB Tour Partial Function Help:  wav_con
%
% WPDENCMP De-noising or compression using wavelet packet.
%    [XD,TREED,DATAD,PERF0,PERFL2] =
%    WPDENCMP(X,SORH,N,'wname',CRIT,PAR,KEEPAPP)
%    returns a de-noised or compressed version XD of input
%    signal X (1-D or 2-D) obtained by wavelet packet
%    coefficients thresholding.
%    Additional output arguments [TREED,DATAD] are the
%    wavelet packet best decomposition structure of XD,
%    PERFL2 and PERF0 are L^2 recovery and compression
%    scores in percentages.
%    PERFL2 = 100*(vector-norm of WP-cfs of XD)^2 over
%    (vector-norm of WP-cfs of X)^2
%    SORH ('s' or 'h') is for soft or hard thresholding
%    (see WTHRESH for more details).
%    Wavelet packet decomposition is performed at level N
%    and 'wname' is a string containing wavelet name.
%    Best decomposition is performed using entropy criterion
%    defined by string CRIT and parameter PAR (see WENTROPY
%    for details). Threshold parameter is also PAR.
%    If KEEPAPP = 1, approximation coefficients cannot be
%    thresholded, otherwise it is possible.
% 
%    [XD,TREED,DATAD,PERF0,PERFL2] =
%    WPDENCMP(TREE,DATA,SORH,CRIT,PAR,KEEPAPP)
%    has same output arguments, using the same options as
%    above, but obtained directly from the input wavelet
%    packet decomposition structure [TREE,DATA] of the
%    signal to be de-noised or compressed.
%    In addition if CRIT = 'nobest' no optimization is done
%    and the current decomposition is thresholded.
% 
%    

function wpthcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% WPTHCOEF Wavelet packet coefficients thresholding.
%    NDATA = WPTHCOEF(DATA,TREE,KEEPAPP,SORH,THR) 
%    returns new data structure obtained from the wavelet
%    packet decomposition structure [DATA,TREE] (see MAKETREE) 
%    by coefficients thresholding.
% 
%    If KEEPAPP = 1, approximation coefficients are not
%    thresholded, otherwise it is possible.
%    If SORH = 's', soft thresholding is applied,
%    if SORH = 'h', hard thresholding is applied
%    (see WTHRESH).
%    THR is the threshold value.
% 
%    

function wthcoef
%MATLAB Tour Partial Function Help:  wav_con
%
% WTHCOEF Wavelet coefficients thresholding 1-D.
%    NC = WTHCOEF('d',C,L,N,P) returns coefficients obtained
%    from the wavelet decomposition structure [C,L] (see WAVEDEC),
%    by rate compression defined in vectors N and P. 
%    N contains the detail levels to be compressed and P the
%    corresponding percentages of lower coefficients 
%    to be set to zero. N and P must be of same length.
%    Vector N must be such that 1 <= N(i) <= length(L)-2.
% 
%    NC = WTHCOEF('d',C,L,N) returns coefficients obtained
%    from [C,L] by setting to zero all the coefficients 
%    of detail levels defined in N.
% 
%    NC = WTHCOEF('a',C,L) returns coefficients obtained by
%    setting approximation coefficients to zero.
% 
%    NC = WTHCOEF('t',C,L,N,T,SORH) returns coefficients obtained
%    from the wavelet decomposition structure [C,L] by soft
%    (if SORH = 's') or hard (if SORH = 'h') thresholding
%    (see WTHRESH) defined in vectors N and T. N contains the
%    detail levels to be thresholded and T the corresponding
%    thresholds. N and T must be of same length.
% 
%    [NC,L] is the resulting wavelet decomposition structure.
% 
%    

function wthcoef2
%MATLAB Tour Partial Function Help:  wav_con
%
% WTHCOEF2 Wavelet coefficients thresholding 2-D.
%    For 'type' = 'h' ('v' or 'd'), 
%    NC = WTHCOEF2('type',C,S,N,T,SORH) returns the horizontal
%    (vert. or diag. respectively) coefficients obtained from
%    the wavelet decomposition structure [C,S] (see WAVEDEC2),
%    by soft (if SORH = 's') or hard (if SORH = 'h') thresholding 
%    defined in vectors N and T. N contains the detail levels 
%    to be compressed and T the corresponding thresholds.
%    N and T must be of the same length.
%    The vector N must be such that 1 <= N(i) <= size(S,1)-2.
% 
%    For 'type' = 'h' ('v' or 'd' respectively),
%    NC = WTHCOEF2('type',C,S,N) returns the  coefficients of
%    'type' orientation obtained from [C,S] by setting to zero
%    all the coefficients of detail levels defined in N.
% 
%    NC = WTHCOEF2('a',C,S) returns the coefficients obtained by
%    setting approximation coefficients to zero.
% 
%    NC = WTHCOEF2('t',C,S,N,T,SORH) returns the detail
%    coefficients obtained from the wavelet decomposition
%    structure [C,S] by soft (if SORH = 's') or hard
%    (if SORH = 'h') thresholding (see WTHRESH) defined in
%    vectors N and T.
%    N contains the detail levels to be thresholded and T the
%    corresponding thresholds which are applied in the three
%    detail orientations.
%    N and T must be of the same length.
% 
%    [NC,S] is the resulting wavelet decomposition structure.
% 
%    

function wthresh
%MATLAB Tour Partial Function Help:  wav_con
%
% WTHRESH Perform soft or hard thresholding. 
%    Y = WTHRESH(X,SORH,T) returns soft (if SORH = 's')
%    or hard (if SORH = 'h') T-thresholding  of the input 
%    vector or matrix X. T is the threshold value.
% 
%    Y = WTHRESH(X,'s',T) returns Y = SIGN(X).(|X|-T)+, soft 
%    thresholding is shrinkage.
% 
%    Y = WTHRESH(X,'h',T) returns Y = X.1_(|X|>T), hard
%    thresholding is a crude one.
% 
%    

function allnodes
%MATLAB Tour Partial Function Help:  wav_con
%
% ALLNODES Tree nodes.
%    ALLNODES returns one of two node descriptions:
%    either indices, or depths and positions.
%    Tree nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    N = ALLNODES(T) returns in column vector N
%    the indices of all nodes of the tree T.
% 
%    N = ALLNODES(T,'deppos') returns in matrix N
%    the depths and positions of all the nodes.
%    N(i,1) is the depth and N(i,2) is the position
%    of node i.

function depo2ind
%MATLAB Tour Partial Function Help:  wav_con
%
% DEPO2IND Node depth-position to node index.
%    For a tree of order O, N = DEPO2IND(O,[D P])
%    computes the indices N of the nodes whose
%    depths and positions are encoded within [D,P].
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    D, P and N are column vectors.
%       D = depths, 0 <= D <= dmax
%       P = positions at depth D, 0 <= P <= order^D-1
%       N = indices, 0 <= N < ((order^(dmax+1))-1)/(order-1)
% 
%    Note: for a column vector X, DEPO2IND(O,X) = X.
% 
%    

function ind2depo
%MATLAB Tour Partial Function Help:  wav_con
%
% IND2DEPO Node index to node depth-position.
%    For a tree of order ORD, [D,P] = IND2DEPO(ORD,N)
%    computes the depths D and the positions P (at 
%    this depths D) for the nodes with indices N.
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    D, P, N, are column vectors.
%       D = depths, 0 <= D <= dmax
%       P = positions at depth D, 0 <= P <= order^D-1
%       N = indices, 0 <= N < ((order^(dmax+1))-1)/(order-1)
% 
%    Note: [D,P] = IND2DEPO(ORD,[D P]).
% 
%    

function isnode
%MATLAB Tour Partial Function Help:  wav_con
%
% ISNODE True for existing node.
%    R = ISNODE(T,N) returns 1's for nodes N which
%    exist in the tree T, and 0's for others.
% 
%    N can be a column vector containing the indices of nodes
%    or a matrix, which contains the depths and positions of nodes.
%    In the last case, N(i,1) is the depth of i-th node 
%    and N(i,2) is the position of i-th node.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    

function istnode
%MATLAB Tour Partial Function Help:  wav_con
%
% ISTNODE True for terminal nodes.
%    R = ISTNODE(T,N) returns ranks (in left to right
%    terminal nodes ordering) for terminal nodes N
%    belonging to the tree T and 0's for others.
% 
%    N can be a column vector containing the indices of nodes
%    or a matrix which contains the depths and positions of
%    nodes.
%    In the last case, N(i,1) is the depth of i-th node 
%    and N(i,2) is the position of i-th node.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    

function leaves
%MATLAB Tour Partial Function Help:  wav_con
%
% LEAVES Terminal nodes.
%    N = LEAVES(T) returns the indices of terminal 
%    nodes of the tree T. N is a column vector.
% 
%    The nodes are ordered from left to right as in tree T.   
% 
%    [N,K] = LEAVES(T,'s') or [N,K] = LEAVES(T,'sort')
%    returns sorted indices.
%    M = N(K) are the indices reordered as in tree T,
%    from left to right.
% 
%    N = LEAVES(T,'dp') returns a matrix N which contains
%    the depths and positions of terminal nodes.
%    N(i,1) is the depth of i-th terminal node and
%    N(i,2) is the position of i-th terminal node.
% 
%    [N,K] = LEAVES(T,'sdp') or [N,K] = LEAVES(T,'pds') or
%    [N,K] = LEAVES(T,'sortdp') or [N,K] = LEAVES(T,'pdsort') 
%    returns sorted nodes.
% 
%    

function maketree
%MATLAB Tour Partial Function Help:  wav_con
%
% MAKETREE Make tree.
%    [T,NB] = MAKETREE(ORD,D) creates a tree structure
%    of order ORD with depth D. 
%    Output argument NB = ORD^D is the number of 
%    terminal nodes.
%    Output vector T is organized as: [T(1) ... T(NB+1)]
%    where T(i), i = 1 to NB, are the indices of terminal
%    nodes and T(NB+1) = -ORD.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    When used with three input arguments,
%    [T,NB] = MAKETREE(ORD,D,NBI) computes T as a 
%    (1+NBI)x(NB+1) matrix with T(1,:) as above
%    and T(2:NBI+1,:) is user free.
% 
%    MAKETREE(ORD)   is equivalent to MAKETREE(ORD,0,0).
%    MAKETREE(ORD,D) is equivalent to MAKETREE(ORD,D,0).
% 
%    

function nodeasc
%MATLAB Tour Partial Function Help:  wav_con
%
% NODEASC Node ascendants.
%    A = NODEASC(T,N) returns the indices of all
%    ascendants of the node N in the tree T.
%    N can be the index node or the depth and position of node. 
%    A is a column vector with A(1) = index of node N. 
% 
%    A = NODEASC(T,N,'deppos') is a matrix which
%    contains the depths and positions of all ascendants.
%    A(i,1) is the depth of i-th ascendant and
%    A(i,2) is the position of i-th ascendant.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    

function nodedesc
%MATLAB Tour Partial Function Help:  wav_con
%
% NODEDESC Node descendants.
%    D = NODEDESC(T,N) returns the indices of all the
%    descendants of the node N in the tree T.
%    N can be the index node or the depth and position of node. 
%    D is a column vector with D(1) = index of node N. 
% 
%    D = NODEDESC(T,N,'deppos') is a matrix which
%    contains the depths and positions of all descendants.
%    D(i,1) is the depth of i-th descendant and
%    D(i,2) is the position of i-th descendant.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    

function nodejoin
%MATLAB Tour Partial Function Help:  wav_con
%
% NODEJOIN Recompose node.
%    T = NODEJOIN(T,N) returns the modified tree structure T
%    corresponding to a recomposition of the node N.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    T = NODEJOIN(T) is equivalent to T = NODEJOIN(T,0).
% 
%    

function nodepar
%MATLAB Tour Partial Function Help:  wav_con
%
% NODEPAR Node parent.
%    F = NODEPAR(T,N) returns the indices of the "parent(s)"
%    of the nodes N in the tree T.
%    N can be a column vector containing the indices of nodes
%    or a matrix which contains the depths and positions of nodes.
%    In the last case, N(i,1) is the depth of i-th node 
%    and N(i,2) is the position of i-th node.
% 
%    F = NODEPAR(T,N,'deppos') is a matrix which
%    contains the depths and positions of returned nodes.
%    F(i,1) is the depth of i-th node and
%    F(i,2) is the position of i-th node.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    Caution : NODEPAR(T,0) or NODEPAR(T,[0 0]) returns -1.
%          NODEPAR(T,0,'deppos') or  NODEPAR(T,[0 0],'deppos')
%          returns [-1 0].
% 
%    

function nodesplt
%MATLAB Tour Partial Function Help:  wav_con
%
% NODESPLT Split (decompose) node.
%    T = NODESPLT(T,N) returns the modified tree
%    structure T corresponding to the decomposition
%    of the node N.
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    

function noleaves
%MATLAB Tour Partial Function Help:  wav_con
%
% NOLEAVES Non terminal nodes.
%    N = NOLEAVES(T) returns the indices of non terminal 
%    nodes of the tree T (i.e. nodes which are not leaves).
%    N is a column vector.
% 
%    N = NOLEAVES(T,'dp') returns a matrix N which
%    contains the depths and positions of non terminal nodes.
%    N(i,1) is the depth of i-th non terminal node and
%    N(i,2) is the position of i-th non terminal node.
% 
%    

function ntnode
%MATLAB Tour Partial Function Help:  wav_con
%
% NTNODE Number of terminal nodes.
%    NB = NTNODE(T) returns the number of terminal nodes
%    in the tree T. 
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    

function plottree
%MATLAB Tour Partial Function Help:  wav_con
%
% PLOTTREE Plot tree.
%    PLOTTREE(T) plots the tree structure T (see MAKETREE).
% 
%    

function tnodes
%MATLAB Tour Partial Function Help:  wav_con
%
% TNODES Terminal nodes (obsolete - use LEAVES).
%    N = TNODES(T) returns the indices of terminal nodes 
%    of the tree T. N is a column vector. 
% 
%    The nodes are numbered from left to right and
%    from top to bottom. The root index is 0.
% 
%    N = TNODES(T,'deppos') returns a matrix N which
%    contains the depths and positions of terminal nodes.
%    N(i,1) is the depth of i-th terminal node and
%    N(i,2) is the position of i-th terminal node.
% 
%    For [N,K] = TNODES(T) or [N,K] = TNODES(T,'deppos')
%    M = N(K) are the indices reordered as in tree T,
%    from left to right.
% 
%    

function treedpth
%MATLAB Tour Partial Function Help:  wav_con
%
% TREEDPTH Tree depth. 
%    D = treedpth(T) returns the depth D of the tree T.
% 
%    

function treeord
%MATLAB Tour Partial Function Help:  wav_con
%
% TREEORD Tree order.
%    ORD = treeord(T) returns the order ORD of the tree T.
% 
%    

function wdatamgr
%MATLAB Tour Partial Function Help:  wav_con
%
% WDATAMGR Manager for data structure.
%    WDATAMGR is a type of data manager for the wavelet packet
%    tree structure.
%    [OUT1,OUT2] = WDATAMGR(O,D,IN3,IN4,IN5) where D is the
%    Data Structure and O is a string option.
%    The possible options are:
%    'write_cfs': writes coefficients for a terminal node,
%      data  = wdatamgr('write_cfs',data,tree,node,coefs)
%    'read_cfs'   : reads coefficients for a terminal node,
%      coefs = wdatamgr('read_cfs',data,tree,node);
%    'read_ent'   : reads the entropy vector,
%      ent   = wdatamgr('read_ent',data,nodes)        
%    'read_ento'  : reads the optimal entropy vector,
%      ento  = wdatamgr('read_ento',data,nodes)
%    'read_tp_ent': reads the type and the parameter for entropy,
%      [type_ent,param] = wdatamgr('read_tp_ent',data)
%    'read_wave'  : reads the name of wavelet,
%      wave = wdatamgr('read_wave',data)
%    'write_wave': writes the name of wavelet,
%      data  = wdatamgr('write_wave',data,wname)
% 
%    

function wtreemgr
%MATLAB Tour Partial Function Help:  wav_con
%
% WTREEMGR Manager for tree structure.
%    VARARGOUT = WTREEMGR(OPT,TREE,VARARGIN)
%    Allowed values for OPT and associated uses are 
%    described in the functions listed in the 

function drawtree
%MATLAB Tour Partial Function Help:  wav_con
%
% DRAWTREE Draw Wavelet Packet Decomposition Tree.
%    DRAWTREE(T,D) draws the Wavelet Packet Tree T.
%    D is the data structure associated with T.
%    F = DRAWTREE(T,D) returns the handle of the figure.
% 
%    For a suitable figure F, DRAWTREE(T,D,F) draws T
%    in the figure F.
% 
%    Example:
%      x = sin(8*pi*[0:0.005:1]);
%      [t,d] = wpdec(x,3,'db2');
%      fig   = drawtree(t,d);
%      %--------------------------------------------
%      % Use command line function to modify t or d
%      %--------------------------------------------
%      [t,d] = wpjoin(t,d,2);
%      drawtree(t,d,fig);
% 
%    

function readtree
%MATLAB Tour Partial Function Help:  wav_con
%
% READTREE Read Wavelet Packet Decomposition from a figure.
%    [T,D] = READTREE(F) reads the Wavelet Packet
%    Decomposition in the figure F.
%    T is the tree structure and D is the data structure
%    associated with T.
% 
%    Example:
%      x = sin(8*pi*[0:0.005:1]);
%      [t,d] = wpdec(x,3,'db2');
%      fig   = drawtree(t,d);
%      %--------------------------------
%      % Use GUI to split or merge Nodes.
%      %--------------------------------
%      [t,d] = readtree(fig);
% 
%    

function deblankl
%MATLAB Tour Partial Function Help:  wav_con
%
% DEBLANKL Convert string to lowercase without blanks.
%    S = DEBLANKL(X) is the string X converted to lowercase 
%    without blanks.

function errargn
%MATLAB Tour Partial Function Help:  wav_con
%
% ERRARGN Check function arguments number.
%    ERR = ERRARGN('function',NUMARGIN,ARGIN,NUMARGOUT,ARGOUT)
%    is equal to 1 if either the number of input
%    ARGIN or output (ARGOUT) arguments of the specified
%    function do not belong to the vector of allowed values
%    (NUMARGIN and NUMARGOUT, respectively). 
%    Otherwise ERR = 0.
% 
%    If ERR = 1, ERRARGN displays an error message in the
%    command window. The header of this error message contains
%    the string 'function'.
% 
%    

function errargt
%MATLAB Tour Partial Function Help:  wav_con
%
% ERRARGT Check function arguments type.
%    ERR = ERRARGT(NDFCT,VAR,TYPE)
%    is equal to 1 if any element of input vector or 
%    matrix VAR (depending on TYPE choice listed below) 
%    is not of type prescribed by input string TYPE.
%    Otherwise ERR = 0.
% 
%    If ERR = 1, an error message is displayed in the command
%    window. In the header message, the string NDFCT is
%    displayed. This string contains the name of a function.
% 
%    Available options for TYPE are :
%    'int' : strictly positive integers
%    'in0' : positive integers
%    'rel' : integers
% 
%    'rep' : strictly positive reals
%    're0' : positive reals
% 
%    'str' : string
% 
%    'vec' : vector
%    'row' : row vector
%    'col' : column vector
% 
%    'dat' : dates   AAAAMMJJHHMNSS
%            with    0 <= AAAA <=9999
%                    1 <= MM <= 12
%                    1 <= JJ <= 31
%                    0 <= HH <= 23
%                    0 <= MN <= 59
%                    0 <= SS <= 59
% 
%    'mon' : months  MM
%            with    1 <= MM <= 12
% 
%    A special use of ERRARGT is ERR = ERRARGT(NDFCT,VAR,'msg')
%    for which ERR = 1 and the string VAR is the error message.
% 
%    

function num2mstr
%MATLAB Tour Partial Function Help:  wav_con
%
% NUM2MSTR Convert number to string in maximum precision.
%    S = NUM2MSTR(N) converts real numbers of input 
%    matrix N to string output vector S, in 
%    maximum precision.
% 
%    

function wcodemat
%MATLAB Tour Partial Function Help:  wav_con
%
% WCODEMAT Extended pseudocolor matrix scaling.
%    Y = WCODEMAT(X,NB,OPT,ABSOL) returns a coded version 
%    of input matrix X if ABSOL=0, or ABS(X) if ABSOL is 
%    nonzero, using the first NB integers. 
%    Coding can be done rowwise (OPT='row' or 'r'), columnwise 
%    (OPT='col' or 'c') or globally (OPT='mat' or 'm'). 
%    Coding uses a regular grid between the minimum and 
%    the maximum values of each row (column or matrix,
%    respectively).
% 
%    Y = WCODEMAT(X,NB,OPT) is equivalent to
%    Y = WCODEMAT(X,NB,OPT,1).
%    Y = WCODEMAT(X,NB) is equivalent to
%    Y = WCODEMAT(X,NB,'mat',1).
%    Y = WCODEMAT(X) is equivalent to
%    Y = WCODEMAT(X,16,'mat',1).

function wcommon
%MATLAB Tour Partial Function Help:  wav_con
%
% WCOMMON Find common elements.
%    For two vectors X and Y with integer components,
%    [XI,YI] = WCOMMON(X,Y) returns two vectors
%    with 0 and 1 components such that:
%    XI(k) = 1 if X(k) belongs to Y otherwise XI(k) = 0 and 
%    YI(j) = 1 if Y(j) belongs to X otherwise YI(j) = 0.

function wextend
%MATLAB Tour Partial Function Help:  wav_con
%
% WEXTEND Extend a Vector or a Matrix.
% 
%    Y = WEXTEND(TYPE,MODE,X,L,LOC) or
%    Y = WEXTEND(TYPE,MODE,X,L)
% 
%    The valid extension modes (MODE) are:
%      'zpd' zero extension.
%      'sp0' smooth extension of order 0.
%      'spd' (or 'sp1') smooth extension of order 1.
%      'sym' symmetric extension.
%      'ppd' periodized extension.
%    and
%      'per' periodized extension.
% 
%    With TYPE = {1,'1','1d' or '1D'}:
%      LOC = 'l' (or 'u') for left  (up) extension.
%      LOC = 'r' (or 'd') for right (down) extension.
%      LOC = 'b' for extension on both sides.
%      The default is LOC = 'b'
% 
%    With TYPE = {'r','row'}
%      LOC = LOCCOL is an 1D extension location.
%      The default is LOC = 'b'
% 
%    With TYPE = {'c','col'}
%      LOC = LOCROW is an 1D extension location.
%      The default is LOC = 'b'
% 
%    With TYPE = {2,'2','2d' or '2D'}:
%      LOC = [LOCCOL,LOCROW] where LOCCOL and LOCROW are 1D
%      extension location or 'n' (none).
%      The default is LOC = 'bb'

function wkeep
%MATLAB Tour Partial Function Help:  wav_con
%
% WKEEP  Keep part of a vector or a matrix.
%    For a vector:
%    Y = WKEEP(X,L,OPT) extracts the vector Y 
%    from the vector X. L is the length of result Y.
%    If OPT = 'c' ('l' , 'r' respectively), Y is the central
%    (left, right respectively) part of X.
%    Y = WKEEP(X,L,FIRST) returns the vector X(FIRST:FIRST+L-1).
% 
%    Y = WKEEP(X,L) is equivalent to Y = WKEEP(X,L,'c').
% 
%    For a matrix:
%    Y = WKEEP(X,S) extracts the central part of the matrix X. 
%    S is the size of Y.
%    Y = WKEEP(X,S,[FIRSTR,FIRSTC]) extracts the submatrix of 
%    matrix X, of size S and starting from X(FIRSTR,FIRSTC).

function wrev
%MATLAB Tour Partial Function Help:  wav_con
%
% WREV Flip vector.
%    Y = WREV(X) reverses the vector X.
% 
%    

function instdfft
%MATLAB Tour Partial Function Help:  wav_con
%
% INSTDFFT Inverse non-standard 1-D fast Fourier transform.
%    [X,T] = INSTDFFT(XHAT,LOWB,UPPB) returns the inverse
%    non-standard FFT of XHAT, on a power of 2 regular
%    grid (non necessarily integers) on the interval
%    [LOWB,UPPB].
%    Output arguments are X the recovered signal computed
%    on the time interval T given by
%    T = LOWB + [0:n-1]*(UPPB-LOWB)/n, where n is the
%    length of XHAT. Outputs are vectors of length n.
% 
%    The length of XHAT must be a power of two.
% 
%    

function nstdfft
%MATLAB Tour Partial Function Help:  wav_con
%
% NSTDFFT Non-standard 1-D fast Fourier transform.
%    [XHAT,OMEGA] = NSTDFFT(X,LOWB,UPPB) returns a non
%    standard FFT of signal X sampled on a power of 2
%    regular grid (non necessarily integers) on the
%    interval [LOWB,UPPB].
% 
%    Output arguments are XHAT the shifted FFT of X
%    computed on the interval OMEGA given by
%    OMEGA = [-n:2:n-2]/(2*(UPPB-LOWB)) where n is the
%    length of X. Outputs are vectors of length n.
% 
%    Length of X must be a power of two.
% 
%    

function waveinfo
%MATLAB Tour Partial Function Help:  wav_con
%
% WAVEINFO Information on wavelets.
%    WAVEINFO provides information for all the wavelets
%    within the toolbox.
% 
%    WAVEINFO('wname') provides information for the wavelet
%    family whose short name is specified by the string 
%    'wname'.
% 
%    Available family short names are:
%    'haar'   : Haar wavelet.
%    'db'     : Daubechies wavelets.
%    'sym'    : symlets.
%    'coif'   : coiflets.
%    'bior'   : biorthogonal wavelets.
%    'rbio'   : reverse biorthogonal wavelets.
%    'meyr'   : Meyer wavelet.
%    'dmey'   : Discrete Meyer wavelet.
%    'gaus'   : Gaussian wavelets.
%    'mexh'   : mexican hat wavelet.
%    'morl'   : Morlet wavelet.
% 
%    or user-defined short names for their own wavelet
%    families (see WAVEMNGR).
% 
%    WAVEINFO('wsys') provides information on wavelet packets.
% 
%    

function wavedemo
%MATLAB Tour Partial Function Help:  wav_con
%
%  Wavelet Toolbox Demos.
% 
%  Demos.
%    wavedemo    - Wavelet toolbox demos.
% 
%
%
%wavedemo is both a directory and a function.
%
% WAVEDEMO wavelet toolbox demos.
%    WAVEDEMO brings up a GUI that allows you to choose
%    between several wavelet toolbox demos.

