grouping first (left column) and last (right column) of consecutive sequence of a Nx2 matrix
Show older comments
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
Accepted Answer
More Answers (1)
Paramonte
on 24 Jan 2019
0 votes
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!