Function to check if matrix exists
function matrix_exist ( row , column , r , c ) { var row_sum = 0 ; var column_sum = 0 ; var row_max = - 1 ; var column_max = - 1 ; var row_non_zero = 0 ; var column_non_zero = 0 ;