Code covered by the BSD License
1.0
by Shivani Rao
07 Oct 2009
Each array is normalized such that rows sum to 1
| Watch this File
No error checking a very basic function easy to understand
Given an array X of size [m,n] output is an array of size [m,n] the rows of the output array sum to 1
could be solved more efficiently by calling bsxfun...
A = magic(4); An = bsxfun(@rdivide,A,sum(A,2));
Contact us at files@mathworks.com