MATLAB: How to find the first entry of a sequence of values

find

I have a matrix of 2 columms by 128 rows. The first columm the numbers 4,5, and 6 appear in a random order. I need to find the first entry of each value in the columm 1. After, I need to find the corresponding value for each entry (4,5,6) position in the columm 2.
For example:
5 0
5 0.60
6 1.30
6 1.61
5 2.10
5 2.50
6 3.22
5 3.87
5 4.30
5 4.67
4 5.23
4 5.40
4 5.70
I need to find the bold numbers in the columm 1 and its respective values in the columm 2.
Thank you in advance,

Best Answer

Hi,
try:
result = A([1; find(diff(A(:,1))~=0)+1],:)
gives the desired result:
result =
5.0000 0
6.0000 1.3000
5.0000 2.1000
6.0000 3.2200
5.0000 3.8700
4.0000 5.2300
Best regards
Stephan