function [r,phi] = polarcoord(x,y)
% returns polar coordinates r and phi [length and angle] with inputs of
% euclidian coordinates x,y
r = sqrt(x.^2 + y.^2);
phi = atan2(y,x);
