Find specific rows of matrix that are subsets of other rows
Mostrar comentarios más antiguos
Hello to all,
I am facing the following problem:
Let us assume that we have a matrix A = [2 10;15 20;50 60;65 70;61 64;16 18;66 69;67 68].
The elements of A(:,1) correspond to start times and the elements of A(:,2) to the end times of something. Thus, the elements of each row correspond to a closed set of values, for example row 1 corresponds to set [2 10].
I would like to find rows that are subsets of other rows and delete them. Specifically after the application of the requested procedure new matrix A_2 should be A_2 = [2 10;15 20;50 60;65 70;61 64], because last three rows of matrix A corresponded to subsets of rows 2 and 4.
I hope that i did explain the problem sufficiently.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!