is called.
must be large enough to contain the number of wavelet coefficients.
If
${\mathbf{keepa}}=\text{'F'}$, the total number of coefficients,
${n}_{c}$, is returned in
nwc by the call to the initialization routine
c09aaf and corresponds to the MODWT being continued for the maximum number of levels possible for the given data set. When the number of levels,
${n}_{l}$, is chosen to be less than the maximum, then the number of stored coefficients is correspondingly smaller and
lenc can be reduced by noting that
${n}_{d}$ detail coefficients are stored at each level, with the storage increased at the final level to contain the
${n}_{a}$ approximation coefficients.
If
${\mathbf{keepa}}=\text{'A'}$,
${n}_{d}$ detail coefficients and
${n}_{a}$ approximation coefficients are stored for each level computed, requiring
${\mathbf{lenc}}\ge {n}_{l}\times ({n}_{a}+{n}_{d})=2\times {n}_{l}\times {n}_{a}$, since the numbers of stored approximation and detail coefficients are equal. The number of approximation (or detail) coefficients at each level,
${n}_{a}$, is returned in
na.