MATLAB: Row unity in matrix

unity

Hi there,
I've created a random 9 times matrix using the command:
P = rand(9,9)
How do I make sure that the rows in each of the matrix are equal to one when added?
Any help will be appreciated!
Thanks

Best Answer

P_norm = P./sum(P,2);