make_pattern_matrix function

Create a matrix of the patterns between conditions