% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cart2pol.R
\name{cart2pol}
\alias{cart2pol}
\title{Transform Cartesian coordinates to polar or cylindrical coordinates.}
\usage{
cart2pol(x, y = NULL, z = NULL)
}
\arguments{
\item{x}{x-coordinates or matrix with three columns}

\item{y}{y-coordinates (optional, if \code{x}) is a matrix}

\item{z}{z-coordinates (optional, if \code{x}) is a matrix}
}
\value{
A matrix \code{P} where each row represents one
  polar/(cylindrical) coordinate (\code{theta}, \code{r}, (,
  \code{z})).
}
\description{
The inputs \code{x}, \code{y} (, and \code{z}) must be the same shape, or
scalar.  If called with a single matrix argument then each row of \code{C}
represents the Cartesian coordinate (\code{x}, \code{y} (, \code{z})).
}
\seealso{
\code{\link{pol2cart}}, \code{\link{cart2sph}},
  \code{\link{sph2cart}}
}
\author{
Kai Habel

David Sterratt
}
