Learn R Programming

evgam (version 1.0.2)

polarise: Convert Cartesian coordinates to Polar coordinates

Description

Convert Cartesian coordinates to Polar coordinates

Usage

polarise(x, norm = 2)

Value

A list containing:

r

The calculated radii (distances from origin).

phi

The angles in radians, adjusted to the range [0, 2*pi].

Arguments

x

A matrix with exactly 2 rows representing the x and y coordinates.

norm

A numeric value specifying the L-p norm for calculating the radius. Defaults to 2 (Euclidean).