grouping first (left column) and last (right column) of consecutive sequence of a Nx2 matrix
Mostra commenti meno recenti
Hi there
We have a Nx2 matrix with pieces of consecutive values that we want to obtain the extreme left and right limits:
A=[100 200; 101 201; 102 202; 300 400; 801 901; 802 902]
we would like to obtain a matrix with limits (left column and right column) in the detected consecutive sequences of the first column. The isolated sequences (in this case [300 400] should be also retrieved.
for A the result would be;
B=[100 202; 300 400; 801 902] ;
thanks in advance
Risposta accettata
Più risposte (1)
Paramonte
il 24 Gen 2019
0 voti
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!