\HeaderA{nullevels.wd}{Sets whole resolution levels of coefficients equal to zero in a wd object.}{nullevels.wd}
\keyword{manip}{nullevels.wd}
\begin{Description}\relax
Sets whole resolution levels of coefficients equal to zero in a \code{\LinkA{wd.object}{wd.object}}
\end{Description}
\begin{Usage}
\begin{verbatim}
nullevels.wd(wd, levelstonull, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{wd}] An object of class \code{\LinkA{wd}{wd}}.
\item[\code{levelstonull}] An integer vector specifying which resolution levels of coefficients of \code{\LinkA{wd}{wd}} that you wish to set to zero. 
\item[\code{...}] any other arguments
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Setting whole resolution levels of coefficients to zero can be very useful. For example, one can construct a linear smoothing method by setting all coefficients above a particular resolution (the \emph{primary resolution} equal to zero. Also setting particular levels equal to zero can also be useful for removing noise which is specific to a particular resolution level (as long as important signal is not also contained at that level). 

Note that this function removes the horiztonal, diagonal and vertical detail coefficients at the resolution level specified. It does not remove the father wavelet coefficients at those resolution levels. 

To remove individual coefficients on a systematic basis you probably want to look at the \code{\LinkA{threshold}{threshold}} function.
\end{Details}
\begin{Value}
An object of class \code{\LinkA{wd}{wd}} where the coefficients in resolution levels specified by \code{levelstonull} have been set to zero.
\end{Value}
\begin{Section}{RELEASE}
Version 3.8.1 Copyright Guy Nason 1997
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{nullevels}{nullevels}}, \code{\LinkA{wd}{wd}}, \code{\LinkA{wd.object}{wd.object}}, \code{\LinkA{threshold}{threshold}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
#
# Generate some test data
#
#test.data <- example.1()$y
#
# Do wavelet transform of test.data and plot the wavelet coefficients
#
#wds <- wd(test.data)
#plot(wds)
#
# Now let us set all the coefficients in ODD resolution levels equal to zero!
#
# This is just to illustrate the capabilities of the function. I cannot
# imagine you wanting to do this in practice!
##
#wdsnl <- nullevels(wds, levelstonull = c(1, 3, 5, 7))
#
# Now let's plot the result
#
#plot(wdsnl, scaling = "by.level")
#
# Lo and behold the odd levels have been set to zero!
\end{ExampleCode}
\end{Examples}

