422 views

### Efficient way of identifying the indices of first occurrences

It seems to me like identifying the first occurrence of unique elements should take about the same amount of time as it takes to delete duplicates. My data sets are much larger than this (...
6k views

### Delete duplicate elements from a list

If a list contains duplicate elements, for example list = {a, 1, 5, 3, 5, x^2, x^2}, how can the duplicate elements be removed? The result would be ...
2k views

### Checking for duplicates in sublists

I have a list with contains entries that are length 8 sublists,i.e. L1={{a1,b1,c1,d1,A1,B1,C1,D1},{a2,b2,c2,d2,A2,B2,C2,D2},...} and so on. Now, in my problem two ...
187 views

### Summing elements in a list by groups indicated by a list of indices

I have two lists, one containing values, the other indices. Now I want to accumulate the values that have the same corresponding index. So for example: ...
378 views

### Find the identical rows in a matrix [duplicate]

Suppose I have the following matrix: ...
267 views

### Using Select in Subsets [duplicate]

I have a list: list = {{7, 6, 14, 14, 4}, {4, 9, 8, 11, 14}, {20, 12, 12, 11, 3}, {7, 4, 11, 7, 20}, {2, 13, 17, 11, 19}} I did a test to identify where ...
1k views

### Why is the new PositionIndex horribly slow?

This issue has largely been mitigated in 10.0.1. New timings for the final test below are: ...
489 views

### Retaining and reusing a one-to-one mapping from a sort

Imagine I sort the elements of an array $Q$ by some means. Perhaps I sort strictly by the elements in the first column, perhaps I use SortBy[...] to sequentially sort by the elements in successive ...
338 views

### Modify BinLists to give elements indices in list instead of giving the list elements belonging to each bin

How could I use BinLists to give elements indices in list instead of giving the list elements belonging to each bin ? Thanks.
146 views

### How to get a description of the positions of similar elements in a list

I want to find a function F to represent the positions of identical elements in a list, which means, for example: ...
302 views

### Interpolating four-dimensional data

In this case it is not easy to work with a MWE, so I shall use the actual data which contain initial conditions $(x,y,p_x,p_y)$. Let's see how the data look on the $(x,y)$ plane ...
146 views

### Determining lists with equal elements in the same position

I would like to define a function with the following properties: Given a list of equal length sub-lists ls={{a,a,a},{a,b,a},{a,b,c}}; Define a function ...
205 views

### position of intersection of two lists

I have the two lists: ...
Consider the following code to produce the sequence $x_1,\ldots,x_{n+1}$ where $x_i=11\cdots1$ ($i$ digits 1). Is there an easier way to do this? ...