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