c09ca computes the one-dimensional discrete wavelet transform (DWT) at a single level. The initialization method C09 Communication class constructor must be called first to set up the DWT options.
Syntax
C# |
---|
public static void c09ca( int n, double[] x, double[] ca, double[] cd, C09..::..C09Communications communications, out int ifail ) |
Visual Basic |
---|
Public Shared Sub c09ca ( _ n As Integer, _ x As Double(), _ ca As Double(), _ cd As Double(), _ communications As C09..::..C09Communications, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void c09ca( int n, array<double>^ x, array<double>^ ca, array<double>^ cd, C09..::..C09Communications^ communications, [OutAttribute] int% ifail ) |
F# |
---|
static member c09ca : n : int * x : float[] * ca : float[] * cd : float[] * communications : C09..::..C09Communications * ifail : int byref -> unit |
Parameters
- n
- Type: System..::..Int32On entry: the number of elements, , in the data array .
- x
- Type: array<System..::..Double>[]()[][]An array of size [n]On entry: x contains the input dataset , for .
- ca
- Type: array<System..::..Double>[]()[][]An array of size [lenc]On exit: contains the th approximation coefficient, , for .
- cd
- Type: array<System..::..Double>[]()[][]An array of size [lenc]On exit: contains the th detail coefficient, , for .
- communications
- Type: NagLibrary..::..C09..::..C09CommunicationsAn Object of type C09.c09caCommunications.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
c09ca computes the one-dimensional DWT of a given input data array,
, for ,
at a single level. For a chosen wavelet filter pair, the output coefficients are obtained by applying convolution and downsampling by two to the input, . The approximation (or smooth) coefficients, , are produced by the low pass filter and the detail coefficients, , by the high pass filter. To reduce distortion effects at the ends of the data array, several end extension methods are commonly used. Those provided are: periodic or circular convolution end extension, half-point symmetric end extension, whole-point symmetric end extension or zero end extension. The number , of coefficients or is returned by the initialization method C09 Communication class constructor.
References
Daubechies I (1992) Ten Lectures on Wavelets SIAM, Philadelphia
Error Indicators and Warnings
Errors or warnings detected by the method:
- On entry, n is inconsistent with the value passed to the initialization method C09 Communication class constructor.
- On entry, , where is the value returned in nwc by the call to the initialization method C09 Communication class constructor.
- On entry, the initialization method C09 Communication class constructor has not been called first or it has been called with , or the communication array icomm has become corrupted.
Accuracy
The accuracy of the wavelet transform depends only on the floating-point operations used in the convolution and downsampling and should thus be close to machine precision.
Parallelism and Performance
None.
Further Comments
None.
Example
This example computes the one-dimensional discrete wavelet decomposition for values using the Daubechies wavelet, , with zero end extension.
Example program (C#): c09cae.cs