# Questions tagged [list-manipulation]

Questions on the manipulation of List objects in Mathematica, and the functions used for these manipulations.

6,424 questions
Filter by
Sorted by
Tagged with
33 views

### Second Attempt at Explaining Average and Checking it using Code

I'm unable to load my original post. The editor stated, "Code is not properly formatted" so I used screenshots. Here is a link which could have been used. It gave an approach to a previous ...
55 views

### Conditional matches in sets of 3-tuples

Suppose that the data is a collection of 3-tuples: ...
25 views

### How to compile a function that takes a list of arguments using InlineExternalDefinitions?

I can do this right now, but I'd love to make the argument a list. (I have a compiled implementation of Linear Solve from here https://mathematica.stackexchange.com/a/91881/73342). ...
86 views

### Create a list that always ends with two 1's but starts with a variable amount of 0's

I want to create a variable list like this: {0, 0, ..., 0, 0, 1, 1} This list would grow list this, starting with no 0's, but then gaining more 0's to the left the ...
32 views

### Generalizing previous question: Partition $[a,b]$ into $m$ sub-intervals and count number of sub-interval intersecting $A_1\subseteq[a,b]$?

In my previous question, How to partition $[a,b]$ into $m$ equal sub-intervals and count the number of sub-intervals that intersect with a subset of $[a,b]$?, I was given an answer to my specific ...
45 views

### Swap two numbers - but only in a particular context

I have a list of terms such as {2*s[1,2]^2, 3*s[3,5]^4, ...} and I would like to have a replacement that swaps $2 \leftrightarrow 4, 3 \leftrightarrow 1$, but only ...
32 views

### Get discrete data points from ListLinePlot or Interpolation

If I have the following data: ...
35 views

354 views

### How to classify an ordered ascending {0, 5, 5, 10, 19, 22, 23} into several classes {{0,9},{10,19}, …}?

I attempted to classify an increasingly ordered list into several classes to make frequency distribution table. I am faced with a difficulty to nest two pure functions: one for ...
109 views

### How to program a situation like the following in mathematics and generalize the process to other configurations?

Distribute the numbers from 1 to 10(view image) so that the sum of each row and each column is the same and a) the maximum possible b) the minimum possible (I put it from 1 to 10 for ease) I know it ...
161 views

### Operation on the first element of list only

If I have the following list: ...
326 views

### How to find the smallest position of an element of an ascending list {1,4,10,12,20} such that the element is not less than 11?

Assume I have an ordered, ascending list {1,4,10,12,20}. I want to find the smallest position of an element of the list such that the element is not less than 11? ...