grouping first (left column) and last (right column) of consecutive sequence of a Nx2 matrix
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Paramonte
le 24 Jan 2019
0 votes
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!