%% Convert Complex Number to Polar Coordinates
% Convert 4 + 3i into polar coordinates.

z = 4 + 3i;
r = abs(z)

%

theta = atan2(imag(z),real(z))

% The radius r and the angle theta are the polar coordinate representation of 4 + 3i.
%
% Alternatively, use angle to calculate theta.

theta = angle(z)

%
% Convert r and theta back into the original complex number.

z = r*exp(i*theta)

% Copyright 2012 The MathWorks, Inc.