# Questions tagged [list-manipulation]

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

9,612 questions
Filter by
Sorted by
Tagged with
255 views

### How to keep specific rows of a matrix based on their second element

Suppose I have the following list: list1 = {{a, 1, c, v, f}, {m, 2, s, f, a}, {s, 2, d, f, g}, {k, 3, g, f, a}, {l, 2, h, j, k}, {b, 1, n, m, d}} I need to ...
1 vote
47 views

### How can I select the positive roots in a list calculated with NSolve?

I've used NSolve to determine the roots of a nonlinear function. There are both positive and negative roots, and I only need the positive ones. I've tried using: <...
• 113
65 views

• 3,911
206 views

### How to make a list of three distinct points are not collinear so that their coordinates consist of nine different numbers from 1 to 9?

I am trying to make a list of three distinct points are not collinear so that their coordinates consist of nine different numbers from 1 to 9, ...
• 1,622
578 views

### How can I select three distinct points are not collinear?

I have a list ...
• 1,622
380 views

### How can I select elements {a,b,c,d,e} in a list so that Or[GCD[a, b, c] == 1 , GCD[d, e] == 1]?

I have a list list = {{-4, -7, -3, 2, 5}, {2, 4, 2, 3, 9}, {2, 4, 6, 3, 5}}; I would like to select elements {a,b,c,d,e} from the list so that GCD[a,b,c]=1 or GCD[...
• 1,622
198 views

### How can I make the list of largest abscissae from a nested list of coordinates?

Suppose I have a nested list of coordinates as: ...
• 2,443
378 views

### How to flatten a mixed multilevel list?

I want to Flatten: ...
• 2,788
58 views

### How to adjust Do loop with conditions?

This code works as expected. ...
• 6,233
58 views

### Mathematica can not recognize the wanted element in a matrix when doing a numeric integral, even though it is plotted on the last step? [closed]

As shown, function 'TestF' is defined via interpolation and maps a number to a 4 by 4 matrix. Its (3,3) element is plotted at step 141, but not recognized in the numeric integration within the same ...
• 159
1 vote
30 views

...
184 views

### Combining expressions and variables to list

I thought this one was easy, but no! How do I get from u = 7; k = 9; r = 4; to {{u, 7}, {k, 9}, {r, 4}} without using ...
• 2,788
123 views

### Construct a list of permuted circles containing arrows [closed]

I am drawing a picture as containing several raws addressed by any permutation of three circles with different radii. My difficulties to solve which I need clues are: 1- Inserting an arrow inside any ...
• 585
804 views

### How can I remove empty lists { } from a nested list?

I have a list: list={{{1},{2},{1,2},{1,2,3},{},{}},{{2},{3},{}}} I would like to remove the empty lists {} to get: ...
• 1,131
232 views

### Partitioning a list based on the count of a certain marker

My goal is to get lists containing k number of 0.1s. For example, in ...
• 648
103 views

### How to find extra points of a graph in a list?

I have a list: list = {{-4, -7, -3}, {-2, -5, -1}, {1, -2, -3}, {2, -1, 3}, {5, 2, 1}, {7, 4, 3}}; I want to make all functions, e.g \$f(x) = \dfrac{(x+4)(x+7)}{x-...
• 1,622
103 views

### Checking whether a set system is intersecting

I have a set of set systems g. I want to select from g those sets systems that are intersecting, that is for every two sets in ...
142 views

### Want Map function to apply over sum of terms but not product

For a given function F, if I use Map[F,a+b+c d], Mathematica returns, as desired: F[a]+F[b]+F[c d] ; However, for ...