Normalizes each row of a matrix so that the sum of the values in each row equals 1. Rows with a sum of zero are excluded.

RowwiseNormalize(x)

Arguments

x

matrix; the matrix to be row-wise normalized.

Value

A numeric matrix with each row normalized so that the sum of the values in each row equals 1.