For any numerical matrix, calculates the different patterns and the frequencies associated to each pattern
The result contains the pattern matrix, a vector with the frequencies, a list with rows sharing the same pattern.
The final pattern matrix has different ordering than the original matrix.