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

learn more… | top users | synonyms (5)

0
votes
0answers
40 views

how to program a dynamic set of numbers

I'm new to the Wolfram Mathematica language. I want to program a dynamic set of numbers in such as: $S={\frac{1+n}{a}=\frac{1}{a};\;\frac{2}{a};\;\frac{3}{a};\; \dots ;\;\frac{1+n_{max}}{a}}$, where ...
4
votes
2answers
192 views

In a list, exclude words that use too many specific letters

Trying to re-rwite for clarity. Referring to my previous lists: I would like to trim a dictionary so that all words that "consume" more than n letters "x" are ...
7
votes
8answers
389 views

Coefficient list of an expression with indices

My apologies if this question has been asked before, but for the first 50 or so questions on coefficientlist, I couldn't find a similar topic. If I've an expression which involves a variable with ...
1
vote
1answer
57 views

Separation of output [duplicate]

I have solved two equations with two unknowns and confined my answer in just ten answers. The unknowns are n and k, and I want ...
4
votes
4answers
182 views

Changing square brackets to curly brackets in list

I have been trying to change a list of 2D coordinates with square brackets to curly brackets so I can plot the set of points in Mathematica. However, it does not plot because it puts quotation marks ...
1
vote
4answers
148 views

For loop over a list for pairwise distance implementation in Mathematica

I am new to Mathematica and want to implement the following functionality in Mathematica. Suppose I have the following list data4 = {{1, 2}, {2, 3}, {1, 3}}; I ...
2
votes
1answer
58 views
3
votes
1answer
89 views

Manipulating the elements of a list

Let's create some sample data tab = Table[{i, j, k}, {i, -3, 3}, {j, -3, 3}, {k, -3, 3}]; ICs = Flatten[tab, 2]; Nt = Length[ICs]; A $3\times3$ system of ...
21
votes
3answers
797 views

Typoglycemia text manipulation

I was just reading the article: https://en.wikipedia.org/wiki/Typoglycemia "... readers can understand the meaning of words in a sentence even when the interior letters of each word are scrambled ...
3
votes
1answer
92 views

Map works but Thread doesn't

This question may be trivial, but I can't get past it for the life of me. I have $n$ matrices of dimension $p_i \times N_i$, with $i$ indexing the $n$-set. I also have $n$ vectors of the appropriate ...
16
votes
16answers
2k views

Generating a list of numbers that are not multiples of 4

I want to write simple code that will list all numbers from $1$ to $n$ that are not multiples of $4$. And in this case I consider that ...
1
vote
2answers
55 views

Creating Association [duplicate]

I have provided a dataset bellow and I would like to store the data as an Association that I can query. Such that e.g. ...
1
vote
1answer
44 views

changing intervals in do loops

I have a main program whose structure has Do loop and changing that to Table form is not easy at this stage. I want to have ...
2
votes
3answers
141 views

Compile error with MapThread

I have the following code: ...
0
votes
1answer
31 views

Conflict in deleting because of some digits [closed]

I have a list at 3dplot and I want to have a list the second element of which be equal to 0.2 ...
0
votes
1answer
44 views

Mapping StringToDouble over nested lists of strings, still confused about slots

This is a simple question about slots but I still cant see how to do it after searching stackexchange. (I'm importing a large data file as text and to convert to numbers I think it'll be quicker to ...
14
votes
2answers
245 views

`Part` like `Delete`: How to delete list of columns or arbitrarily deeper levels [duplicate]

On trying to write this answer I reached the frustrating realization that I didn't have an efficient way to delete a list of columns or deeper level components in a simple way as ...
15
votes
4answers
486 views

Reproducing a ranking function that behaves like Excel's RANK

I tried to find a function or expression in Mathematica that produces the same output as the RANK function in Excel (see its description here), but unfortunately I ...
0
votes
1answer
51 views

Number of points of a polygon [closed]

Hi I have the following polygon: a = {{{-105.5, 842.}, {-105.5, 496.464}, {1.4375, 519.379}, {28.5, 528.271}, {28.5, 655.25}, {3.6, 842.}}} I want to count ...
1
vote
1answer
37 views
3
votes
1answer
61 views

How can I get the arguments of the function Graph?

If I have f0 = f[x,y,z] and I am interested in the list of the arguments, what I do is ...
3
votes
2answers
38 views

Setting initial conditions of a domain grid?

So I'm writing some code to try and produce a cellular automaton which will model an oscillatory chemical reaction, but I'm trying to set up the initial conditions of the grid so that I can vary them ...
3
votes
0answers
56 views

Searching a deeply nested list [closed]

I have a deep nested ragged list. ...
11
votes
1answer
98 views

Speed up Dynamic for graphical interface

I am trying to create a user interface where I can click on certain points in a set of data and save them into a list that can be used later in my code. The problem is it is currently sluggish. Is ...
9
votes
5answers
201 views

Transpose two uneven lists [duplicate]

I am trying to plot two lists using the ListPlot command. I need to merge two lists. The two lists I have are: ...
3
votes
2answers
80 views

Problem with Custom Sort/Split/Gather

Please help me Sort/Split/Gather/Group(by) a set of symbolic expressions! (extreme TL;DR at bottom) I have a set of symbols (which represent 2-vectors in a plane, ultimately) and I want to ...
4
votes
1answer
106 views

Trim a list of elements [closed]

I suppose this is a trivial question to many of you, please bear with me. I have a long list of words, list1. I would like to "remove all words that contain a specific letter, say "o". ...
9
votes
4answers
243 views

How to convert a sparse matrix to a list of sparse arrays?

I have a matrix stored as a SparseArray. How can I convert it to a List of its rows, where each row is stored as a ...
4
votes
2answers
198 views

Replacing numbers of which you only know certain digits

If I have a list of numbers like this: list = {0.3565127, 0.8656421, 0.231479879, 0.39698787, 0.536987651}, which are all between 0 and 1, each having lots of ...
7
votes
2answers
109 views

Deleting certain elements from a nested list

I have a nested list of the form {{{{a, 0},{b, 1},{c, 2}}, {{d, 4},{e, 5},{f, 6}}} ... } where the $...$ just means it goes on like that. On the innermost level, ...
3
votes
2answers
91 views

Get position in list of the first element with a certain property

Consider a toy list l = {x[2],x[32],x[43],x[56],x[72]}; I would like to find the position of the first element within this list, for which ...
1
vote
2answers
72 views

Is it possible to draw a line on a MatrixPlot that would reflect density of row values? [closed]

I have a MatrixPlot with some data and I'd like to draw a vertical lines representing the "average" (density) of that data for each row. Something like this for ...
4
votes
2answers
219 views

Elegant way to partition list to be faster than `ParallelTable` (using `ParallelSubmit`), or some alternative?

Suppose you have a function fun[x_] := (Pause[.05*x]; x^2); of which you know that its evaluation time increases with its argument - in this case obviously ...
8
votes
1answer
185 views

Taking one list Mod a second list

Just on my free trial and can't find this anywhere in online docs. Trying to use the Mod function as follows: Mod[{list},{list}} where it takes each number in list ...
3
votes
1answer
87 views

How do I convert Subscript[{4, 5, 1}, 7] to the integer 4*1 + 5*7 + 1*7^2 = 88?

I am working with the finite fields package in Mathematica 9. If I input: GF[7, {-2, 0, 0, 1}][{3, 4, 1}]^2 Mathematica gives me $\{4,5,1\}_7$. I want to ...
0
votes
1answer
66 views

Normalize data in feature engineering

Here is the dataset to be used to train the model. ...
4
votes
1answer
59 views

Transform set of linear equations into matrix and two vectors

Consider a list L containing entries dependent on variables x[i] (the i are integer, yet not ...
3
votes
1answer
67 views

Conditional deleting pairs inside a list of pairs [duplicate]

I have a list of pairs for example like following: list={{1,0.001},{10^(-7),0.001},{0.01,0.00005},{10^(-11),10^(-4)}} Now I would like to delete all pairs (the ...
1
vote
1answer
42 views

Question about transforming a list of rules

Consider the following list: ...
3
votes
2answers
95 views

Count values inside sublists separately

I've the following problem: given a nested list like this: a={{1,2,3,2,1},{2,3,4,6,4,3,2},{4,5,12,5,4}}; How can I count, in each sublist, those values that are ...
3
votes
2answers
99 views

Delete duplicates from a list of pairs with a SameTest [duplicate]

I have a list of pairs, for example like this: list = {{1, 1.1}, {1.00001, 1.1000001}, {2, 1}} I would like to delete a pair which is lies within a certain ...
2
votes
2answers
84 views

List Manipulation on Grouping and Shifting [closed]

I have an input list = {a,b,c,d,e,f}, I would like to get this output {{a,b},{b,c},{c,d},{d,e},{e,f}} What is the easiest ...
8
votes
3answers
230 views

How to create a version of FixedPointList for asymptotically periodic functions?

I need to efficiently generate a bunch of bifurcation diagrams. A simple familiar example illustrates the efficiency problems I'm running into: ...
17
votes
6answers
771 views

Apply multiple functions to same list

I'd like to get the Min, Max, Median, Mean, etc. for the same list. For now I'm doing the following: ...
3
votes
2answers
101 views

How do I run 1-855 data points( imported from excel sheet) into a formula to obtain value for each data point?

I am very new to Mathematica and I just couldn't figure out the solution for the following problem. I have two columns in an Excel file. I have imported the 1st column as ...
7
votes
1answer
142 views

MovingAverage - not enough memory exception

I'm running into an extremely bizarre issue that evades reproduction by means other, than repeating my actions verbatim. Please note, this question is NOT about digitizing a plot. It just describes ...
0
votes
3answers
54 views

saving last elements of a list into another grouped list

If we have a list (data1) of 201*201 members as {a,b,c} (which a,b and c are numeric), how can we save them into another list (data2) containing just c's in the ...
1
vote
2answers
153 views

How to create a custom histogram (normalized)

Let's create some sample data ...
3
votes
1answer
93 views

Eliminating elements from sublists under a global condition

Consider the following list of 4215 sublists (note that the file as displayed at github is truncated, but there is a link to the full version). Each of the ...