### Tags: atwo-dimensional, delete, duplicate, everybody, matlab, matrix, programming, thks, values, x-y

# How to delete duplicate data

On Programmer » Matlab

1,907 words with 3 Comments; publish: Sat, 10 May 2008 02:48:00 GMT; (200125.00, « »)

Hello everybody,

I would like to know how to delete x-y duplicate values in a

two-dimensional matrix A.

thks in advance

Frederic

*http://matlab.questionfor.info/q_matlab_26170.html*

All Comments

Leave a comment...

- 3 Comments
- frederic wrote:
> Hello everybody,

> I would like to know how to delete x-y duplicate values in a

> two-dimensional matrix A.

Probably using UNIQUE, but you're going to have to be

more specific about what you want to do.

Can you give an example?

- Randy

#1; Sat, 10 May 2008 02:49:00 GMT

- frederic wrote:
- Hello Randy
Another way, i've got 2 vectors x =[2 1 0.6 4] y=[3 4 5 2]

the aim is to get another vector z =[x'

y'];

but i don't want to duplicate values in z that are in x and y (2,4);

so z =[2

1

0.6

4

3

5];

Is there a function in Matlab that does this.

THks

Frederic

Randy Poe wrote:

>

> frederic wrote:

> Probably using UNIQUE, but you're going to have to be

> more specific about what you want to do.

> Can you give an example?

> - Randy

>

#2; Sat, 10 May 2008 02:51:00 GMT

- Hello Randy
- frederic wrote:
>

> Hello Randy

> Another way, i've got 2 vectors x =[2 1 0.6 4] y=[3 4 5 2]

> the aim is to get another vector z =[x'

> y'];

> but i don't want to duplicate values in z that are in x and y

> (2,4);

> so z =[2

> 1

> 0.6

> 4

> 3

> 5];

> Is there a function in Matlab that does this.

> THks

> Frederic

Unique does it, but the problem is

you may need a tolerance on floating

point values. You can get a tolerance

with consolidator.

<http://www.mathworks.com/matlabcent...>

HTH,

John

#3; Sat, 10 May 2008 02:51:00 GMT

- frederic wrote: