\HeaderA{medianFilter}{Apply a median filter to a matrix}{medianFilter}
\keyword{manip}{medianFilter}
\begin{Description}\relax
For each element in a matix, replace it with the median of the
values around it.
\end{Description}
\begin{Usage}
\begin{verbatim}
medianFilter(x, mrad, nrad)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] numeric matrix to median filter
\item[\code{mrad}] number of rows on either side of the value to use for median
calculation

\item[\code{nrad}] number of rows on either side of the value to use for median
calculation

\end{ldescription}
\end{Arguments}
\begin{Value}
A matrix whose values have been median filtered
\end{Value}
\begin{Author}\relax
Colin A. Smith, \email{csmith@scripps.edu}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
mat <- matrix(1:25, nrow=5)
mat
medianFilter(mat, 1, 1)
\end{ExampleCode}
\end{Examples}

