If you don't need the square root, sumabs2 is even more efficient and can work 
over dimensions.

--Tim

On Saturday, May 16, 2015 06:05:06 AM Dominique Orban wrote:
> It seems you're trying to compute a dot product. Try dot(M[:,1], M[:,1]) or
> norm(M[:,1]). Of course, as a side comment, that quantity can't be negative
> ;).

Reply via email to