find occurrence of patterns in labeled rows of a matrix

4 Ansichten (letzte 30 Tage)
didi
didi am 15 Mär. 2018
Bearbeitet: didi am 15 Mär. 2018
Hi, I have a matrix with 18 columns, the first 17 refers to the parameters and the last one is the label. Each parameter can have a value 0, 1 or 2, and the labels are as well 0, 1 and 2. the rows of the matrix refers to the all possible combination of the 17 parameters. I would like to find a way to detect for each subset of the matrix with a certain label if a certain patterns of the 17 parameters is repeated in the subset. Let's assume I have only 5 parameters and a subset of the matrix labeled 0 like this: [0 0 0 1 1; 0 0 1 0 2; 0 0 1 1 2; 0 2 2 2 2; 1 0 0 0 0; 1 0 0 1 1; 1 0 2 0 0] there is a function in matlab able to recognize repeted pattern in the rows of this matrix?
  2 Kommentare
Guillaume
Guillaume am 15 Mär. 2018
So, in your example, which pattern are supposed to be detected? All the rows look unique to me.
didi
didi am 15 Mär. 2018
Bearbeitet: didi am 15 Mär. 2018
I would like to search not for a specific pattern, but for any repeated pattern.For example in the first and second rows the first 2 elements are 0 0 * * *; in the second and third rows 0 0 1 * 2 is repeated; in the first and six rows the * 0 0 1 1 pattern is repeated. then I would like to cluster these repetitions respect the numbers of element repeated and positions.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by