# Vector deduplication operation

**URL:** <https://community.freefem.org/t/vector-deduplication-operation/2829>\
**Category:** General Discussion\
**Created:** [December 11, 2023, 6:45am UTC](https://community.freefem.org/t/vector-deduplication-operation/2829 "2023-12-11T06:45:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tan](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@Tan](https://community.freefem.org/u/Tan)\
**Post date:** [December 11, 2023, 6:45am UTC](https://community.freefem.org/t/vector-deduplication-operation/2829/1 "2023-12-11T06:45:04Z")

</div>

Hello, I would like to ask how to operate vector deduplication in FreeFem? For example, I have a vector, but there are many repeated elements in it. I need to remove the repeated elements and save them in a new vector. Does anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [December 11, 2023, 6:45am UTC](https://community.freefem.org/t/vector-deduplication-operation/2829/2 "2023-12-11T06:45:47Z")

</div>

Use the `Unique()` operator: `Unique(input, output)`.

---

<div class="post-metadata">

**Author:** ![Tan](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@Tan](https://community.freefem.org/u/Tan)\
**Post date:** [December 11, 2023, 11:03am UTC](https://community.freefem.org/t/vector-deduplication-operation/2829/3 "2023-12-11T11:03:37Z")

</div>

Thank you very much!
