Find 3 values equal and consecutive in the row of a matrix.
Mostra commenti meno recenti
Goodnight. Disturbing them again with another concern. I have a matrix called "Cons" that in its last row is numbered (which is not necessarily ascending or has a consecutive order, like 1,2,3 ... etc). I want to look for groups of 3 elements (in that row) that are equal and consecutive, so that I can indicate the positions of these groups. It should be noted that the "Cons" matrix is of variable size, and therefore the length of its last row depends on the size of the first. The variable "i" indicates the position of the last row. Below I leave an image to better illustrate the matter
Cons(BC,:)=[ ];
i=i-fila_Col_cero;

Thank you very much to all.
2 Commenti
Image Analyst
il 17 Mag 2019
Try diff(). Attach your data in a .mat file if you still need help.
Pedro Guevara
il 17 Mag 2019
Risposte (1)
Raghunandan V
il 6 Giu 2019
0 voti
Hi Pedro,
Try to this lib by Jos
You can use this to solve your problem!
Regards,
Raghunandan V
Categorie
Scopri di più su Startup and Shutdown in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!