FUNCTION REFERENCE

cart2pol

Cartesian to polar or cylindrical coordinates.

Cartesian to polar or cylindrical coordinates.

Syntax

[theta, rho] = cart2pol(x, y)

Syntax

[theta, rho, z] = cart2pol(x, y, z)

theta is atan2(y,x) and rho is hypot(x,y). Inputs must have the same size, or be scalar. z is passed through unchanged.

Example

[t, r] = cart2pol(1, 1); [t r]   % [0.7854 1.4142]

Differences from MATLAB: Real double inputs only; complex, character, logical and cell input stop with an error.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.