\HeaderA{trmat}{Evaluate Trend Surface over a Grid}{trmat}
\keyword{spatial}{trmat}
\begin{Description}\relax
Evaluate trend surface over a grid.
\end{Description}
\begin{Usage}
\begin{verbatim}
trmat(obj, xl, xu, yl, yu, n)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{obj}] object returned by \code{surf.ls} or \code{surf.gls}

\item[\code{xl}] limits of the rectangle for grid

\item[\code{xu}] 
\item[\code{yl}] 
\item[\code{yu}] 
\item[\code{n}] use \code{n}  x  \code{n} grid within the rectangle

\end{ldescription}
\end{Arguments}
\begin{Value}
list with components \code{x}, \code{y} and \code{z} suitable for \code{contour} and \code{image}.
\end{Value}
\begin{References}\relax
Ripley, B. D. (1981) \emph{Spatial Statistics.} Wiley.

Venables, W. N. and Ripley, B. D. (2002)
\emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{surf.ls}{surf.ls}}, \code{\LinkA{surf.gls}{surf.gls}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(topo, package="MASS")
topo.kr <- surf.ls(2, topo)
trsurf <- trmat(topo.kr, 0, 6.5, 0, 6.5, 50)
\end{ExampleCode}
\end{Examples}

