Find repeating line in matrix

1 Ansicht (letzte 30 Tage)
Buket Sahin
Buket Sahin am 4 Dez. 2021
Kommentiert: Buket Sahin am 4 Dez. 2021
1 759.500000000000
2 779.500000000000
3 779.500000000000
4 779.500000000000
5 958.167000000000
6 958.167000000000
7 958.167000000000
8 958.167000000000
9 958.167000000000
10 1048.10000000000
11 1048.10000000000
Here is my sample matrix. For example, the value 779.500 repeated 4 times, while the value 958.1670 repeated 5 times. I want to find the first consecutive repeating value in the 2nd column of the matrix and transfer it to a new matrix as a row. After transferring, it should be seen as following;
1 759.500000000000
5 958.167000000000
10 1048.10000000000
Could you help me how can I do this?

Akzeptierte Antwort

Matt J
Matt J am 4 Dez. 2021
Bearbeitet: Matt J am 4 Dez. 2021

Weitere Antworten (0)

Kategorien

Mehr zu Physics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by