Hi, I'm looking for a way to get duplicate numbers from list.

Janeis's icon

Hi, I'm looking for a way to get duplicate numbers from list.
I mean numbers that do repeat in the list not the numbers that does not repeat.
Example: list 1 2 3 2 3 4 5 -> object? -> output: 2 3
zl thin, zl change, zl sect, zl filter does not work...

Floating Point's icon

this should work:

Max Patch
Copy patch and select New From Clipboard in Max.

Janeis's icon

Thank you for reply.
I made some workaround using coll, but you example is a lot better.
Have no idea whats going on there, but it is just what I was looking for. Great!
Thank you!

Floating Point's icon

Glad it is suitable; by way of explanation all it does is sort the input list, so that any duplicates are adjacent to each other, then it iterates through the sorted list to compare neighbors. If they are equal then they must be repetitions and are put into another list (the output list). It's important to analyze the patch to make sure you know what's going on and that you understand it.