From: konrad on
Hi!

I want do delete this rows where values are repeat.
e.g.

A=[
1,2
2,3
2,3
2,3
4,5
4,5
6,7
]

exit should be:

A=[
1,2
2,3
4,5
6,7
]

i've read sth about "unique" but i dont know excatly how to use it
From: Steven Lord on

"konrad " <qnrad(a)wp.pl> wrote in message
news:i0vhjj$i0d$1(a)fred.mathworks.com...
> Hi!
>
> I want do delete this rows where values are repeat.

*snip*

> i've read sth about "unique" but i dont know excatly how to use it

Then now would seem to be a perfect time to learn how to use UNIQUE. Type
one or both of the following at the MATLAB prompt and read the descriptions,
then try using the function yourself.

help unique
doc unique

If you still can't achieve your goal, show the group what you've tried and
someone should be able to help you.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Andy on
% one solution

A=[
1,2
2,3
2,3
2,3
4,5
4,5
6,7
];

B=unique(A,'rows');

% Also:

doc unique
From: Roger Stafford on
"konrad " <qnrad(a)wp.pl> wrote in message <i0vhjj$i0d$1(a)fred.mathworks.com>...
> Hi!
>
> I want do delete this rows where values are repeat.
> e.g.
>
> A=[
> 1,2
> 2,3
> 2,3
> 2,3
> 4,5
> 4,5
> 6,7
> ]
>
> exit should be:
>
> A=[
> 1,2
> 2,3
> 4,5
> 6,7
> ]
>
> i've read sth about "unique" but i dont know excatly how to use it
- - - - - - - - -
There are some questions that might be asked here about what you want. In your example you showed only consecutive repeats. Are those the only ones to be deleted? Using unique will remove all duplications. Are you satisfied with the sorted order produced by unique or would you like to restore the remaining rows to their original sequencing? If the latter, then when a row appears in duplicate which copy would you like removed? It would make a difference in the ordering.

Roger Stafford