<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>C09AAF : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/C09/c09aaf.pdf">C09AAF (PDF version)</a></div><div><a class="chap" href="c09conts.xml">C09 Chapter Contents</a></div><div><a class="chapint" href="c09intro.xml">C09 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>C09AAF</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> 
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">C09AAF returns the details of the chosen discrete wavelet filter. For a chosen mother wavelet, discrete wavelet transform type (single-level or multi-level DWT) and end extension method, this routine returns the number of levels of resolution (appropriate to a multi-level transform), the filter length, and, the number of approximation and detail coefficients, or the total number of coefficients (for single-level or multi-level DWTs respectively). This routine must be called before any of the transform routines in this chapter.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;C09AAF&#160;(</td><td class="tdfspec2"><a class="arg" href="#WAVNAM">WAVNAM</a>, <a class="arg" href="#WTRANS">WTRANS</a>, <a class="arg" href="#MODE">MODE</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#NWL">NWL</a>, <a class="arg" href="#NF">NF</a>, <a class="arg" href="#NWC">NWC</a>, <a class="arg" href="#ICOMM">ICOMM</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">N, NWL, NF, NWC, ICOMM(100), IFAIL</td></tr><tr><td class="tdfspec1">CHARACTER*(*)</td><td class="tdfspec2">WAVNAM</td></tr><tr><td class="tdfspec1">CHARACTER*1</td><td class="tdfspec2">WTRANS, MODE</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">One-dimensional discrete wavelet transforms (DWT) are characterised by the mother wavelet, the end extension method and whether multiresolution analysis is to be performed.  For the selected combination of choices for these three characteristics, and for a given length (<m:math><m:mi>n</m:mi></m:math>) of data array, C09AAF returns the dimension details for the transform determined by this combination.  The dimension details are: <m:math><m:msub><m:mi>n</m:mi><m:mi>l</m:mi></m:msub></m:math>, the number of levels of resolution that would be computed were a multi-level DWT applied, <m:math><m:msub><m:mi>n</m:mi><m:mi>f</m:mi></m:msub></m:math>, the filter length, and <m:math><m:msub><m:mi>n</m:mi><m:mi>c</m:mi></m:msub></m:math>&#160;the number of approximation and detail coefficients for single-level DWTs and the total number of coefficients for multi-level DWTs that would be generated by the transform. These values are also stored in the communication array <a class="arg" href="#ICOMM">ICOMM</a>, as are the input choices, so that they may be conveniently communicated to the transform routines in this chapter.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="WAVNAM" id="WAVNAM"/>1: &#160;&#160;&#8194; WAVNAM &#8211; CHARACTER*(*)<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the name of the mother wavelet. See the <a class="chapint" href="../C09/c09intro.xml">C09 Chapter Introduction</a> for details.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'HAAR'</m:mtext></m:math></dt>
<dd>Haar wavelet.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'DB</m:mtext><m:mi mathvariant="bold-italic">n</m:mi><m:mtext>'</m:mtext></m:math>, where <m:math><m:mi mathvariant="bold-italic">n</m:mi><m:mo>=</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mn>3</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mn>10</m:mn></m:math></dt>
<dd>Daubechies wavelet with <m:math><m:mi mathvariant="bold-italic">n</m:mi></m:math>&#160;vanishing moments (<m:math><m:mn>2</m:mn><m:mi mathvariant="bold-italic">n</m:mi></m:math>&#160;coefficients).
For example, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'DB4'</m:mtext></m:math>&#160;is the name for the Daubechies wavelet with <m:math><m:mn>4</m:mn></m:math>&#160;vanishing moments (<m:math><m:mn>8</m:mn></m:math>&#160;coefficients).</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'BIOR</m:mtext><m:mi mathvariant="bold-italic">x</m:mi></m:math>.<m:math><m:mi mathvariant="bold-italic">y</m:mi><m:mtext>'</m:mtext></m:math>, where <m:math><m:mi mathvariant="bold-italic">x</m:mi></m:math>.<m:math><m:mi mathvariant="bold-italic">y</m:mi></m:math>&#160;can be one of 1.1, 1.3, 1.5, 2.2, 2.4, 2.6, 2.8, 3.1, 3.3, 3.5 or 3.7</dt>
<dd>Biorthogonal wavelet of order <m:math><m:mi mathvariant="bold-italic">x</m:mi></m:math>.<m:math><m:mi mathvariant="bold-italic">y</m:mi></m:math>. For example <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'BIOR3.1'</m:mtext></m:math>&#160;is the name for the Biorthogonal wavelet of order <m:math><m:mn>3.1</m:mn></m:math>.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'HAAR'</m:mtext></m:math>, <m:math><m:mtext>'DB2'</m:mtext></m:math>, <m:math><m:mtext>'DB3'</m:mtext></m:math>, <m:math><m:mtext>'DB4'</m:mtext></m:math>, <m:math><m:mtext>'DB5'</m:mtext></m:math>, <m:math><m:mtext>'DB6'</m:mtext></m:math>, <m:math><m:mtext>'DB7'</m:mtext></m:math>, <m:math><m:mtext>'DB8'</m:mtext></m:math>, <m:math><m:mtext>'DB9'</m:mtext></m:math>, <m:math><m:mtext>'DB10'</m:mtext></m:math>, <m:math><m:mtext>'BIOR1.1'</m:mtext></m:math>, <m:math><m:mtext>'BIOR1.3'</m:mtext></m:math>, <m:math><m:mtext>'BIOR1.5'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.2'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.4'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.6'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.8'</m:mtext></m:math>, <m:math><m:mtext>'BIOR3.1'</m:mtext></m:math>, <m:math><m:mtext>'BIOR3.3'</m:mtext></m:math>, <m:math><m:mtext>'BIOR3.5'</m:mtext></m:math>&#160;or <m:math><m:mtext>'BIOR3.7'</m:mtext></m:math>.
</div>
</dd><dt class="paramhead"><a name="WTRANS" id="WTRANS"/>2: &#160;&#160;&#8194; WTRANS &#8211; CHARACTER*1<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the type of discrete wavelet transform that is to be applied.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'S'</m:mtext></m:math></dt>
<dd>Single-level decomposition or reconstruction by discrete wavelet transform.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'M'</m:mtext></m:math></dt>
<dd>Multi-level resolution, by a multi-level DWT or its inverse.</dd></dl>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'S'</m:mtext></m:math>&#160;or <m:math><m:mtext>'M'</m:mtext></m:math>.
</div></dd><dt class="paramhead"><a name="MODE" id="MODE"/>3: &#160;&#160;&#8194; MODE &#8211; CHARACTER*1<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the end extension method.

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'P'</m:mtext></m:math></dt>
<dd>Periodic end extension.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'H'</m:mtext></m:math></dt>
<dd>Half-point symmetric end extension.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'W'</m:mtext></m:math></dt>
<dd>Whole-point symmetric end extension.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'Z'</m:mtext></m:math></dt>
<dd>Zero end extension.</dd></dl>
</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'S'</m:mtext></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'P'</m:mtext></m:math>, <m:math><m:mtext>'H'</m:mtext></m:math>, <m:math><m:mtext>'W'</m:mtext></m:math>&#160;or <m:math><m:mtext>'Z'</m:mtext></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'M'</m:mtext></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'H'</m:mtext></m:math>, <m:math><m:mtext>'W'</m:mtext></m:math>&#160;or <m:math><m:mtext>'Z'</m:mtext></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="N" id="N"/>4: &#160;&#160;&#8194; N &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the number of elements, <m:math><m:mi>n</m:mi></m:math>, in the data array <m:math><m:mi>x</m:mi></m:math>.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="NWL" id="NWL"/>5: &#160;&#160;&#8194; NWL &#8211; INTEGER<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the maximum number of levels of resolution, <m:math><m:msub><m:mi>n</m:mi><m:mi>l</m:mi></m:msub></m:math>, that can be computed when a multi-level discrete wavelet transform is applied.  It is such that <m:math><m:msup><m:mn>2</m:mn><m:msub><m:mi>n</m:mi><m:mi>l</m:mi></m:msub></m:msup><m:mo>&#8804;</m:mo><m:mi>n</m:mi><m:mo>&lt;</m:mo><m:msup><m:mn>2</m:mn><m:mrow><m:msub><m:mi>n</m:mi><m:mi>l</m:mi></m:msub><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:math>, for <m:math><m:msub><m:mi>n</m:mi><m:mi>l</m:mi></m:msub></m:math>&#160;an integer.</div>
</dd><dt class="paramhead"><a name="NF" id="NF"/>6: &#160;&#160;&#8194; NF &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the filter length, <m:math><m:msub><m:mi>n</m:mi><m:mi>f</m:mi></m:msub></m:math>, for the supplied mother wavelet. This is used to determine the number of approximation coefficients that are appropriate to each level of a multi-level DWT.</div></dd><dt class="paramhead"><a name="NWC" id="NWC"/>7: &#160;&#160;&#8194; NWC &#8211; INTEGER<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: for a single-level transform (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'S'</m:mtext></m:math>), the number of approximation coefficients that would be generated for the given problem size, mother wavelet, extension method and type of transform; this is also the corresponding number of detail coefficients. For a multi-level transform (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'M'</m:mtext></m:math>) the total number of coefficients that would be generated over all levels of resolution.</div>
</dd><dt class="paramhead"><a name="ICOMM" id="ICOMM"/>8: &#160;&#160;&#8194; ICOMM(<m:math><m:mn>100</m:mn></m:math>) &#8211; INTEGER array<span class="pclass">Communication Array</span></dt><dd>
<div class="paramtext"><i>On exit</i>: contains details of the wavelet transform and the problem dimension which is to be communicated to the discrete transform routines in this chapter.</div>
</dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>9: &#160;&#160;&#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>). <div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, if you are not familiar with this parameter, the recommended value is <m:math><m:mn>0</m:mn></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn mathvariant="bold">1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div></div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WAVNAM"><m:mi mathcolor="#EE0000" mathvariant="bold">WAVNAM</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mtext>'HAAR'</m:mtext></m:math>, <m:math><m:mtext>'DB2'</m:mtext></m:math>, <m:math><m:mtext>'DB3'</m:mtext></m:math>, <m:math><m:mtext>'DB4'</m:mtext></m:math>, <m:math><m:mtext>'DB5'</m:mtext></m:math>, <m:math><m:mtext>'DB6'</m:mtext></m:math>, <m:math><m:mtext>'DB7'</m:mtext></m:math>, <m:math><m:mtext>'DB8'</m:mtext></m:math>, <m:math><m:mtext>'DB9'</m:mtext></m:math>, <m:math><m:mtext>'DB10'</m:mtext></m:math>, <m:math><m:mtext>'BIOR1.1'</m:mtext></m:math>, <m:math><m:mtext>'BIOR1.3'</m:mtext></m:math>, <m:math><m:mtext>'BIOR1.5'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.2'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.4'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.6'</m:mtext></m:math>, <m:math><m:mtext>'BIOR2.8'</m:mtext></m:math>, <m:math><m:mtext>'BIOR3.1'</m:mtext></m:math>, <m:math><m:mtext>'BIOR3.3'</m:mtext></m:math>, <m:math><m:mtext>'BIOR3.5'</m:mtext></m:math>&#160;or <m:math><m:mtext>'BIOR3.7'</m:mtext></m:math>.</td></tr></table>
</dd>
</dl>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mtext>'S'</m:mtext></m:math>&#160;or <m:math><m:mtext>'M'</m:mtext></m:math>.</td></tr></table>
</dd>
</dl>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mtext>'P'</m:mtext></m:math>, <m:math><m:mtext>'H'</m:mtext></m:math>, <m:math><m:mtext>'W'</m:mtext></m:math>&#160;or <m:math><m:mtext>'Z'</m:mtext></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MODE"><m:mi mathcolor="#EE0000" mathvariant="bold">MODE</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'P'</m:mtext></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WTRANS"><m:mi mathcolor="#EE0000" mathvariant="bold">WTRANS</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'M'</m:mtext></m:math>.</td></tr></table>
</dd>
</dl>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>2</m:mn></m:math>.</td></tr></table>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">Not applicable.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example computes the one-dimensional multi-level resolution for <m:math><m:mn>8</m:mn></m:math>&#160;values by a discrete wavelet transform using the Haar wavelet with zero end extensions.  The length of the wavelet filter, the number of levels of resolution, the number of approximation coefficients at each level and the total number of wavelet coefficients are printed. </div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/c09aafe.f">Program Text (c09aafe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/c09aafe.d">Program&#160;Data (c09aafe.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/c09aafe.r">Program Results (c09aafe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/C09/c09aaf.pdf">C09AAF (PDF version)</a></div><div><a class="chap" href="c09conts.xml">C09 Chapter Contents</a></div><div><a class="chapint" href="c09intro.xml">C09 Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>
