﻿ c09cb Method
c09cb computes the inverse 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 c09cb(
double[] ca,
double[] cd,
int n,
double[] y,
C09..::..C09Communications communications,
out int ifail
)```
Visual Basic
```Public Shared Sub c09cb ( _
ca As Double(), _
cd As Double(), _
n As Integer, _
y As Double(), _
communications As C09..::..C09Communications, _
<OutAttribute> ByRef ifail As Integer _
)```
Visual C++
```public:
static void c09cb(
array<double>^ ca,
array<double>^ cd,
int n,
array<double>^ y,
C09..::..C09Communications^ communications,
[OutAttribute] int% ifail
)```
F#
```static member c09cb :
ca : float[] *
cd : float[] *
n : int *
y : float[] *
communications : C09..::..C09Communications *
ifail : int byref -> unit
```

#### Parameters

ca
Type: array<System..::..Double>[]()[][]
An array of size [lenc]
On entry: the ${n}_{c}$ approximation coefficients, ${C}_{a}$. These will normally be the result of some transformation on the coefficients computed by c09ca.
cd
Type: array<System..::..Double>[]()[][]
An array of size [lenc]
On entry: the ${n}_{c}$ detail coefficients, ${C}_{d}$. These will normally be the result of some transformation on the coefficients computed by c09ca.
n
Type: System..::..Int32
On entry: $n$, the length of the original data array from which the wavelet coefficients were computed by c09ca and the length of the data array y that is to be reconstructed by this method.
Constraint: This must be the same as the value n passed to the initialization method c09aa.
y
Type: array<System..::..Double>[]()[][]
An array of size [n]
On exit: the reconstructed data based on approximation and detail coefficients ${C}_{a}$ and ${C}_{d}$ and the transform options supplied to the initialization method c09aa.
communications
Type: NagLibrary..::..C09..::..C09Communications
An Object of type C09.c09cbCommunications.
ifail
Type: System..::..Int32%
On exit: ${\mathbf{ifail}}={0}$ unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).

# Description

c09cb performs the inverse operation of c09ca. That is, given sets of ${n}_{c}$ approximation coefficients and detail coefficients, computed by c09ca using a DWT as set up by the initialization method C09 Communication class constructor, on a real data array of length $n$, c09cb will reconstruct the data array ${y}_{i}$, for $\mathit{i}=1,2,\dots ,n$, from which the coefficients were derived.

None.

# Error Indicators and Warnings

Errors or warnings detected by the method:
${\mathbf{ifail}}=1$
On entry, ${\mathbf{lenc}}<{n}_{c}$, where ${n}_{c}$ is the value returned in nwc by the call to the initialization method C09 Communication class constructor.
${\mathbf{ifail}}=4$
On entry, n is inconsistent with the value passed to the initialization method C09 Communication class constructor.
${\mathbf{ifail}}=6$
On entry, the initialization method C09 Communication class constructor has not been called first or it has been called with ${\mathbf{wtrans}}=\text{"M"}$, or the communication array icomm has become corrupted.
${\mathbf{ifail}}=-9000$
An error occured, see message report.
${\mathbf{ifail}}=-1000$
The array lengths are not the same for arrays
${\mathbf{ifail}}=-8000$
Negative dimension for array $〈\mathit{\text{value}}〉$
${\mathbf{ifail}}=-6000$
Invalid Parameters $〈\mathit{\text{value}}〉$

# 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.

None.