function [mag angle] = c2p(c)
%c2p converts Cartesian to polar coordinates.
%
% Dr. C. S. Tritt
% Last revised 1/11/07
    X = 1; % Use symbols to make code more readable.
    Y = 2; % Use symbols to make code more readable.
    mag = sqrt(c(X)^2+c(Y)^2); % Calculate magnitude.
    angle = atan2(c(X),c(Y)); % Calculate angle.
end