Linked Questions
16 questions linked to/from Delete duplicate elements from a list
6
votes
2
answers
540
views
Faster Alternative to DeleteDuplicates for deleting elements in list [duplicate]
I have a list in this style
data={{a1,b1,c1,d1,e1,f1}, {a2,b2,c2,d2,e2,f2}}
I need to delete all elements in which b1 is ...
1
vote
2
answers
543
views
Operations on sets of sets [duplicate]
Possible Duplicate:
How can I remove B -> A from a list if A -> B is in the list?
Delete duplicate elements from list
Pattern matching deletion of list items
How do I delete the ...
604
votes
19
answers
158k
views
Where can I find examples of good Mathematica programming practice?
I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
93
votes
5
answers
15k
views
What does the construct f[x_] := f[x] = ... mean?
This question mentions "x := x = trickery".
What does defining a function as f[x_] := f[x] = ... do and what is it good for?
78
votes
9
answers
12k
views
How to efficiently find positions of duplicates?
Is there an efficient way to find the positions of the duplicates in a list?
I would like the positions grouped according to duplicated elements. For instance, given
...
37
votes
9
answers
4k
views
How to select minimal subsets?
I am a newbie, so please point me in the right direction if you feel this question has been answered somewhere else before. Here goes:
Suppose I have a list like this:
...
44
votes
6
answers
7k
views
How to splice together several instances of InterpolatingFunction?
I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
22
votes
9
answers
4k
views
How do you check if there are any equal arguments(even sublist) in a list?
I would like to set up a function which has to return True if at least two arguments of a given List are equal.
So if I give {1,4,6,2} to the function it has to ...
36
votes
3
answers
2k
views
DeleteDuplicatesBy is not performing as I'd hoped. Am I missing something?
Déjà vu: a new-in-v10 function should provide a better solution to an old problem, but my enthusiasm is curbed when I run timings. This time the function is ...
20
votes
7
answers
3k
views
How to use Union on list of lists without sorting them first?
If I do
ClearAll[a, d]
lsts = {{a, d}, {a, d}};
Union[lsts]
I get the expected answer
{{a, d}}
but if I do
...
12
votes
4
answers
41k
views
Creating a table/Matrix during a For loop
I have a For loop (with i as a counter), which calculates different values (y1, ...
13
votes
6
answers
1k
views
Sort+Union on a list
Probably this is too trivial question for this forum but for some reason I am not getting it on my Mathematica 7 so far.
I have a list
...
2
votes
5
answers
572
views
Combining lists
How can I combine
list1={{x1,y1},{x2,y2},{x3,y3}}
and
list2={{x4,y4},{x5,y5}}
to
...
15
votes
5
answers
259
views
Faster position-based duplicate removal in a ragged array?
Take a ragged 2D array:
rArray={{4, 2, 1, 0}, {2, 2}, {0, 0, 3, 3, 3}, {4, 0}, {3, 4}}
I need to "deduplicate" this, where a duplicate is any element of a ...
6
votes
3
answers
698
views
How to remove duplicate elements from two separated lists efficiently?
I have two lists of elements:
indices = {Prime /@ Range[5000], Prime /@ Range[100, 300]} // Flatten;
values = RandomReal[100, 3] & /@ Range[Length[indices]];
...