%% Cartesian to Cylindrical Coordinates
% Convert the three-dimensional Cartesian coordinates defined by corresponding entries in the matrices x, y, and z to cylindrical coordinates theta, rho, and z.

x = [1 2.1213 0 -5]'

%

y = [0 2.1213 4 0]'

%

z = [7 8 9 10]'

%

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

% Copyright 2012 The MathWorks, Inc.