MATLAB: How to create random binary matrix with specified number of ones in each row and column

binary matrixmatrixsparse

Number of raws = M, number of columns = N, number of one's in each row = Nrow, number of one's in each column = Ncolumn.