|
Hi Matt,
Thanks for the suggestion. I found that with one correction, i got what i wanted. with your script, the output was
newa =
2 33
3 32
4 65
instead of what i wanted. so i changed the last line of the code to
newa = sa(intersect(idx1,idx2),:)
and now it works just fine.
Regards,
"Matt Fig" <spamanon@yahoo.com> wrote in message <gm04td$d6d$1@fred.mathworks.com>...
> One method:
>
> a=[1 34
> 2 33
> 2 45
> 3 32
> 4 65
> 4 99
> 5 11
> 1 33
> 6 22];
>
> sa = sortrows(a,1);
> [idx1,idx1] = unique(sa(:,1),'first');
> [idx2,idx2] = unique(sa(:,1),'last');
>
> newa = sa(idx1==idx2,:)
>
>
>
>
>
> c)]\cf^\dgzhTcjj^5ozg`zpz"zjz\jb]oj\"o`hzd\tiqzpH;@ijk\\``k
|