function sph = cart2sph_mat( cart )

% function sph = cart2sph_mat( cart )
%
% cart: 3 x N matrix of ( x, y, z ).' coordinates
%
% sph: 3 x N matrix of ( azimuth, elevation, radius ).' coordinates
  
  
  if nargin < 1
    error( [ mfilename ' needs 1 input argument.' ] );
  end

  [az,el,r] = cart2sph( cart(1,:), cart(2,:), cart(3,:) );

  sph = [az;el;r];
  
  