# Tagged Questions

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

81 views

### Simplify on a structured array

Why doesn't Simplify and FullSimplify operate on object generated using SymmetrizedArray? ...
149 views

### How to do a Check for every element in the list?

I know how to do a Check for the list in general: ...
166 views

### How to split list to strings?

Considering a list: lst = {"1", "2", "3", "4", "5", "6"} How can I have two strings : str1 = "1, 2, 3" str2 = "4, 5, 6" ...
179 views

### Add elements of one list to sublists of another list [duplicate]

I have the following list of sublists with different lengths {{1,1,1},{2,2},{3,3,3,3}} and a second list {4,5,6}with the same ...
457 views

### Bug in MovingMap (breaking change between version 10.1 and 10.0.2)?

The MovingMap window spec has been changed between version 10.1 and 10.0.2. Version 10.0.2 ...
238 views

### Create a list of rules built from data set fields

I want to convert a dataset to a list of features and a list of target values, for use in Predict and also more generally. I know ...
38 views

### Strange behaviour of Append [closed]

I have the following situation and I completely do not understand why the second system can be solved but the first (of the same equations, as it seems) cannot. How is it possible? ...
142 views

### Make a program that does union of two lists

I have to make a program that gives as a result the union of two lists using a For loop. I can't figure out how to inspect if the elements of a list are different. ...
177 views

### Complex numbers from two arrays with Real and Imaginary parts

I have two arrays, containing the real and imaginary parts of a list of complex numbers. Re = {{Re_number1},{Re_number2},...} Im = {Im_number1},{Im_number2},...} ...
98 views

### sparse array with list [closed]

i'm trying to populate a sparse array with lists in certain positions, i tried the following code, ...
224 views

### How to map over inner keys of nested Associations?

Considering an association: <|"a" -> <|aa-> "asc", bb-> "asd", cc-> 0, ImageType -> "asd", dd-> "asd"|>|> How can I make the inner ...
790 views

### Writing a circular matrix

I have two square matrices, $A$ and $B$, of the same size, say, of $m \times m$. What I want is to write a programme/function of three variables, $A$, $B$ and $n$, that outputs the $mn \times mn$ ...
66 views

### How can I manipulate this list?

I performed a loop with Table where I solve a system of 4 equations that depends on two parameters: eta and p. I create two lists for each parameter as follows: <...
295 views

### How to switch from array to string?

Considering we have an array: a = {2/3, 4/5, 9/7, 3/7, 1/7, 1/9}; How can I get this to be: "2/3 4/5 9/7 3/7 1/7 1/9" ...
428 views

### Most efficient way of making pair list from a list

I have a bunch of datasets which looks like: 3 7 1 6 5 8 2 4 1 2 8 1 5 2 5 ... and I need to make a list of pairs such that the first element makes a pair with ...
72 views

### Do TakeWhile and LengthWhile work with Greater? [closed]

TakeWhile[{1, 2, 3, 4, 5}, # > 3 &] gives me {}. Similarly ...
124 views

### Creating a new list from other two lists using for loops

I have two lists 'ups' and 'downs' where they are composed of positions of an element in a matrix and their weight. For example, ...
216 views

### How to highlight the elements in a list that match a pattern?

For example, {{1,2,3},{1,2,3,1,2,3,4,5}}with pattern {1,_,3}is transformed to ...
78 views

### How do I get a list of all the variable present in an algebraic expression? [duplicate]

I have an algebraic expression ...
73 views

### Delete permutations of subtables in a table [closed]

I've got a table of tables: $A=\{\{a,b\},\{b,a\},...,\{a,b,c,d,e\},\{e,d,c,a,b\},...\}$. How do I do to remove backward duplicates, or more generally permutations of duplicates in the table? For ...
59 views

124 views

### How to make function accept list of rules as an argument?

Considering the list of rules: r= {"a" -> "1", "b" -> "2", "c" -> 3, d -> 231, "e" -> 1.25}; I want to have a function ...
150 views

### DeleteDuplicates in a list of 2-tuples under condition

Having a list of 2-tuples, I would like to delete such 2-tuples that have 0 at second position, but only those, whose first element is not unique in the list. E.g. ...
210 views

### How to manage list of list of rules?

Considering we have a list: str = "{1 -> {a -> aa, b -> bb}, 2 -> {2a -> \"{b -> bb}\"}}" Bringing this to expression gives: ...
87 views

### Automatically assign Variablenames to multiple checkboxes

I want to implement the option to import data from Excel and then the ability to trim this data in order to fit the needs. The import from Excel: (source) ...
112 views

### Find list item before first negative value [closed]

If I have a list like this: ...
405 views

### How to delete Missing[“NotAvailable”] from list of rules? [duplicate]

Considering we have a list of rules: ...
100 views

### Accumulating elements of lists taking the criteria out of another list

In order to find the critical values for the significance of a discrete distribution, for example BinomialDistribution[20,0.6], i need a function which works on the ...
60 views

### Combine nested list entries [closed]

I have a list with stock index data (which I load from a database) as follows: ...
568 views

### Count elements of a list

Let's create a random list n = 100; data = Table[{RandomReal[{0, 2}], RandomReal[{-1, 1}]}, {i, 0, n}] Now we divide the $(x,y)$ plane into four sectors with the ...
140 views

### Manipulating list based on Euclidean distance

I have an array of 101 matrices. Each matrix contains information like id, position (x,y,z), time etc about a collection of particles, looks like this ...
115 views

### Summing terms in Table

I have a table that looks like Table[m, {k, 10}, {j, k}, {i, j}] where, m is a square matrix that depends on the indices \$i, ...
89 views

### Circular Playing up in a Grid

As we know, there is a possibility to emphasize some elements of a Grid by highlighting its cell with ...
844 views

### Replacing a for-loop with something functional

I'm a physics grad and have been using Mathematica mostly for data visualization. The evaluation part I normally do with C/Python, but I've been wanting to try out Mathematica for these tasks, too. ...
474 views

### How to insert a Matrix into a larger matrix

I have a 4x4 matrix v1 v2 v3 v4 myM={{a1,a2,c1,c2}, v1 {a2,a3,c2,c3}, v2 {c1,c2,d1,d2}, v3 {c2,c3,d2,d3}} v4 And I want to ...
108 views

### Combining sub-matrices by replacing zero elements with symbols

I have a nested matrix as m: ...
303 views

### How to check if two nested lists have the same structure?

How can I check if nested lists like these have the same structure: ...
99 views

### SameTest issue?

Folks, I am trying to construct and algorithm which finds all of the remaining groupings (of three items, in this case) from a list of items for which no two items are in groups that have previously ...
80 views

### Filling a matrix with a list of lists

I have a list of lists with different lengthes: {{a1,a2},{b1,b2},{c1,c2,c3},...} Now I want to create a matrix the following way: ...
98 views

### Unexpected results from output with NumberForm and ScientificForm

I wrote this little function to help me export tables with formatted numbers to files: (By the way, if you have suggestions on how to make it more efficient and compact, it would be great) ...
1k views

### Convert a list of hexadecimal numbers to decimal

I know that to change a single number from hexadecimal representation to decimal, you can use: base^^digits. However, if you have a list of numbers, Mathematica ...
183 views

### How to apply list of values to a list of functions

I have the following: first= {1+a,2+a,3+a,4+a} and a list t={0,1,2,3} I want to evaluate the first element of "first" at ...
523 views

### How do I prune a list of pairs of numbers so that each number occurs on only one pair?

How do I select only the first pair of numbers in which a number occurs from a list of pairs of numbers? For example, I have ...