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

learn more… | top users | synonyms (5)

1
vote
1answer
42 views

Question about transforming a list of rules

Consider the following list: ...
3
votes
2answers
99 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
107 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
87 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
241 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
801 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
105 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
155 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
55 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
162 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 ...
6
votes
5answers
223 views

Create a list of all possible multivariate monomials of a certain order

Given variables x[i] for i=1,2,...,n I would like to create a list of all possible multivariate monomials of order ...
1
vote
1answer
50 views

Creating table out of two lists

I have two lists: fi = { -0.25, -0.21 , -0.1, ...} fv = { 2, 3, 4, ...} Now I want to export these in form of a CSV file, which should look like this: ...
6
votes
1answer
171 views

Smoothing the Sharp Undesired Points in ListPlot3D

I have a large list at list3, when I use of ListPlot3D list, I face to some undesired points which are sharp and caused by calculation error. I want to replace them ...
2
votes
1answer
59 views

Matching and counting reversed pairs in a list

Given a list of character pairs like {{"w", "u"}, {"a", "j"}, {"c", "s"}, {"s", "l"}, ....}, I would like to group the reversed set pairs and then get a total count ...
0
votes
1answer
68 views
0
votes
0answers
26 views

Finding a specific position within a TimeSeries Forecast [duplicate]

Say I have a timeseriesforecast on a series of data, result in $10, 30, 50, 100, 400, 700, \ldots$ I want the programme to output the serial number (position in the forecast-series) of the first ...
10
votes
4answers
336 views

Efficient way to make subsets of list with placeholders

I have an arbitrary list of unique elements: lst = {a, b, c, d} Documentation allows finding subsets with same number of elements, say ...
0
votes
1answer
43 views

Manipulation of ListPlot of an imported list versus first elements

I have seen 1& 2 but I could not find an answer helping me. I have created (by another program) a list as below: ...
15
votes
7answers
1k views

How do I delete all items that occur more than once?

DeleteDuplicates works fine but leaves a single copy of the duplicated item. I need to remove all items that occur more than once i.e. {{1,2},{1,2},{3,4}} -> ...
1
vote
1answer
71 views

making Max and Min work columnwise like Median

I have some data and the rows are grouped according to astGroupsPos (the astGroupsPos are just rows from ...
3
votes
1answer
55 views

A question about the `ArrayResample`

I have a confusion with the function of ArrayResample.This is a illustrative picture in Details and Options about the method of "Bin": Then I make a example like this: ...
0
votes
2answers
55 views

Assigning columns of data from a file to variables extracted from headers

I'm very new to Mathematica. I want import a file in which the first colum is a function f1, the second another function f2. So the file looks like this: ...
0
votes
0answers
66 views

Select positive elements from a list of solutions

I'm solving two equations with two unknowns ...
0
votes
2answers
97 views

Combining two lists by merging element-wise [closed]

I have two lists, L1 and L2, each with some data and two scenarios: ...
2
votes
0answers
38 views

Generating a List of Numbers with “Table” Causing Deviation [closed]

I'm trying to generating a list of numbers with the function table. But it caused a little deviation which I didn't expect. Let's say I need a function like: ...
3
votes
2answers
89 views

Role of Accuracy in numerical evaluations, SplitBy vs GatherBy

This is a follow-up question to this question. I generated a list by substituting the results of a solve[] routine and set: ...
1
vote
2answers
95 views

plotting all solutions of differential equations for many parameters

I have a list whose elements is in the form {{f[x]-> some function of x}}. How do I manipulate it to bring in the form ...
9
votes
3answers
323 views

GatherBy/SplitBy and Sort a list

So let's say I want to group a list of points based on their distance from the origin. I would do something like: ...
1
vote
1answer
75 views

Plotting a two lists generated after running a for loop [closed]

So i had to model and solve a harmonic oscillator, being driven by a random driving force. I have managed to finish that and my program is: ...
3
votes
2answers
52 views

Function for generically controlling 'Manipulate' parameters

I want to use a generic function to generate controls in manipulate, which looks like this: ...
3
votes
1answer
69 views

Reading an exported List

I have exported a list of 2d coordinates as a List: Export["F:\\coordinates.dat", coordinates, "List"]; You can access the ...
3
votes
2answers
85 views

Plot markers for monthly data

I have the following data ...
4
votes
1answer
84 views

Creating a list of unevaluated pure functions with Apply

Suppose I have a list list with length L and a function ...
5
votes
1answer
103 views

Table with List iterator return unpacked list

Table support list as iterator, for example list1=Table[w, {w, Range[1., 10., 0.01]}]; We can confirm that list1 is packed ...
16
votes
3answers
459 views

How to group and join points

It seems there are many similar questions on Mathematica.SE, but none addresses (to the best of google) exactly my problem. I have the following data: ...
1
vote
3answers
129 views

Compute intermediate totals using Select and Plus in a list

I have to total per year of weekly results of a function which are in a table with 3 rows: one with the result of the function, one with the week number and one with the year number. I am almost sure ...
4
votes
1answer
88 views

Is it possible to recover the efficiency of ListConvolve when generalizing the convolution?

I've noticed that, while ListConvolve is very fast, it becomes much slower when you use anything but the standard Times,Plus as ...
2
votes
0answers
58 views

How can I convert some data in TableForm to a list form like as {{0,1}, {1,2},{…,…},…,{m,n}}? [closed]

How can I convert some data in TableForm to a list form like as So, I have some data there I take from laboratory, but the data has a TableForm 0.0 0.2174 1e-06 0.2178 2e-06 0.2172 3e-06 0....
12
votes
7answers
644 views

Brackets around each item in matrix

I have a matrix where every item in the matrix has its own brackets that I do not want. How can I remove the brackets around each item?
0
votes
1answer
51 views

How to make an empty list inside a module program? It consatly spews errors [duplicate]

Okay, so, I'm trying to write a program within the module. It goes like this: create empty list, join it with a sample from a certain set called MyList, and then repeat it certain number of times. ...
19
votes
5answers
495 views

Partitioning a list when the cumulative sum exceeds 1

I have a long list of say 1 million Uniform(0,1) random numbers, such as: dat = {0.71, 0.685, 0.16, 0.82, 0.73, 0.44, 0.89, 0.02, 0.47, 0.65} I want to ...
1
vote
1answer
59 views

How to refer a number in a list with two columns, first one is a number and the second one is empty? [closed]

Let's say, I have defined a list as list = {{-31, -31}, {52, }, {34, -11}, {-38, }, {78, -44}, {-36,14}, {-9, 98}, {33, 6}, {82, 99}, {-85, -10}} As you can see, ...
7
votes
1answer
134 views

Add terms to nested list

Suppose I have a nested list of the following: list={{1,2},{5,8},{4,1}...} I would like to add a number to each first term of the list. The output would be ...
2
votes
1answer
105 views

Automatic text-wrapping in labels in `TimelinePlot`

Part-related to this question and part-related to this one, I would like to make use of the new features of TimelinePlot in 10.3, but would like to incorporate some ...
3
votes
1answer
78 views

Calculating products of given length of two matrices

I have the following problem to solve. Let us have two given square matrices $A$ and $B$ of the same size and a positive integer $n$. I would like to produce all products of length at most $n$ of ...
3
votes
1answer
136 views

Efficiently generating tuples with Outer

I'm trying to efficiently generate tuples of lists of objects that satisfy a given criterion. The similar questions that I have found on this website end up finding a specific workaround for the given ...
1
vote
1answer
42 views

Reverse element in nested list [closed]

Suppose I have a list as the following: list={{1,9},{7,0},{8,6}....} How can I reverse the element in such way that the output would be the following: ...
3
votes
0answers
59 views

Weird behaviour for a vector InterpolatingFunction inside an NDSolve

I have run into some weird behaviour on the part of NDSolve which I find pretty bizarre and which I would like to understand better. Suppose, for the sake of ...
2
votes
0answers
51 views

Transposing a table [closed]

I created this table so that it is a collection of 5 different functions that I need. It outputs the values that I want, however, I cannot figure out how to get the orientation right. I would like to ...