A variation of Matlab's cart2sph, that transforms a vector of Cartesian coordinates (East, North, Up) to radar coordinates (Range, Azimuth, Elevation). Note the different definition of radar coords vs. spherical coords, which require this different function (see exact definitions within the help comment).
input format #1: [...] = xyz2rae(x,y,z)
input format #2: [...] = xyz2rae(xyz)
output format #1: [range, azimuth,...