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

learn more… | top users | synonyms (4)

0
votes
0answers
10 views

Large lists to manipulate later in chunks

If I try to evaluate either one of the following expressions: Table[n, {10^8, 10^9] Range[10^8, 10^9] I get ...
1
vote
2answers
61 views

Perform calculation on several sublists using Map

I am trying to perform a calculation on a list containing sublists. More exact: The x-axis values are time data, progressing from zero, the y-axis data are data points, which I want to normalize. I ...
0
votes
0answers
36 views

Piecewise NDSolveValue: Nested Variable Iteration

I am attempting to make the variable Rc a piecewise-function of [z] and have it update as NDsolve iterates through the range of 'z' such as {z,0,Le), but to no avail. The following code is an attempt ...
0
votes
0answers
34 views

Manipulating output of polynomial expansion

This question clarifies and extends the one that was posted here. I have the following short code which generates a polynomial: ...
0
votes
0answers
58 views

Manipulating the output form of a polynomial [on hold]

I have the following short code which generates a polynomial: ...
2
votes
3answers
156 views

Reassigning values in Map

I have a list of lists. Minimal example: lists = {{a,b,c},{d,e,f}} I want to set the values on position 2 (b and e) to the value of their right neighbour (c and ...
0
votes
0answers
66 views

Fitting Data using GeometricBrownianMotionProcess

I am trying to fit Data (see below) using a GeometricBrownianMotionProcess, and have attached two figures. One figure is that of the Data, and the other of the GeometricBrownianMotion for given ...
1
vote
2answers
34 views

Converting data set from one form to another

I wish to convert Data to Data2. Both sets are provided below. Note that the second set has an arbitrary parameter "t". How can this be done. ...
11
votes
5answers
299 views

Partition a list into sublists of different lengths

I have the list {a, b, c, d, e, f, g, h, i} and I want to make a sub-list of the form {{{a, b}, c}, {{d, e}, f}, {{g, h}, i}} ...
6
votes
2answers
220 views

Modifying the elements of a list according to a given probability

Let list be a list of lists, the elements of which are random integers in the interval $[1,c]$. Each element $i$ has a probability ...
6
votes
5answers
149 views

Nested list from a flat folder list

I have a list of folders and files in my current working directory as a result of a built-in function FileNames: FileNames["*", "", Infinity]]. It looks like this: ...
0
votes
3answers
53 views

How to generate a list of outputs for function f(x,y) for a set of known (x,y) values [on hold]

Say I want a list of outputs the function f(x,y)=x+y will give for x,y values of (1,5),(5,3),(0,2),(1,1),(2,6). How do I do that? I know this must be pretty straight forward. I just can't figure it ...
0
votes
1answer
29 views

Using Select function to select elements based on last element of nested list [on hold]

Good morning, I have a list with each element containing a tuple and a single. It is of this form: ...
7
votes
0answers
51 views

How to partition a 2-D array properly?

Given that I have the following array lst = Array[Subscript[P, #1, #2] &, {5, 5}, {0, 0}] $ \left( \begin{array}{ccccc} P_{0,0} & P_{0,1} & P_{0,2} ...
-2
votes
0answers
25 views

“Extract” certain elements of a list of “rules”? [duplicate]

I have the following list: {u1[0] -> 3773.62, u2[0] -> 3773.62, u3[0] -> 48.7871} I need to extract the elements on the right hand side of each rule ...
1
vote
1answer
27 views

Histogram and Random Lists [closed]

Suppose I have the following list listrand of random numbers from RandomReal[-30,30] (where the size of the list is 40). Is ...
2
votes
1answer
66 views

How to find the local minimum points in the multi-dimensional numerical data?

I am trying to get some local minima of an n-dimensional function (which only has numerical form). For two-dimensional function data, we can find the local minimum points from the contour plot easily. ...
1
vote
3answers
108 views

Scatter plot with smooth lines [closed]

I have two lists of data between which there may be some functional dependence. I want to plot one against the other (hence scattered plot) where the points are connected by smooth lines. In ...
1
vote
1answer
58 views

Assign List of Vectors to List

I want to assign a list of vectors (though each only contains one) to a list. For example, create list called "eVectors" and do ...
1
vote
2answers
88 views

How to find the palindromic number I'm looking for?

I'm looking for a number which is the same when you read it reverse like 101 or 878. I have to get all numbers from 10 to 1000. There are 99 numbers. ...
5
votes
2answers
71 views

Nested permutations

I would like to compute all "nested permutations" (not sure if it's the right term) of a list consisting of simple elements (numbers, strings) and simple sublists (level 1 lists of simple elements). ...
0
votes
1answer
39 views

How to delete some elements from a list? [duplicate]

This question is asked quite often but none of the answers I found seem to do what I want. I have a list ...
3
votes
5answers
293 views

Function involving For loop

I've written the following function (the code includes the output): ...
2
votes
1answer
111 views

Need Help Writing code to find Capparelli Partitions

I am trying to add multiple criterion to IntegerPartitions[n] so that it sorts only partitions that fit the criterion. It creates a list of list of numbers in ...
6
votes
1answer
92 views

Split list into overlapping sublists

I would like to split a list into overlapping sublists! I want to generate a first sublist with a specified number of elements. Then I want to shift one element to the right and generate an ...
1
vote
0answers
52 views

Compile a listable function to be applied over list of lists [closed]

Consider a simple function g[x_,y_,z_] := x + y + z; (indeed, any multivariate function g will illustrate the same thing). ...
0
votes
1answer
39 views

Could I use Select with condition on any column other than First (Last)? [closed]

I often deal with huge tables of various functions of randomly generated values for my research. Sometimes there's need to only keep rows which satisfy a specific condition. This is easy with ...
1
vote
1answer
36 views

Selecting last partition in integer partition [closed]

I want to get the last partition from an integer partition. For example: IntegerPartitions[8, {3}] ...
1
vote
2answers
115 views

Doing same operation on multiple files

Is there a way in mathematica to do same operation on multiple files at once? And preferably have the output in a table or list form? I want to do the following operation preferably in few non-labor ...
5
votes
4answers
167 views

How to find the right permutation, which fits to the problem?

I'm new here and I hope I can find some help. I'm from Germany, so sorry for my English. I look for a number, whose digits are all different. It isn't known how many digits it has. But there is a ...
0
votes
1answer
63 views

Extract all elements of an expression in order into a list [closed]

I have and expression a + b + c - d and I would like to generate a list of {a, +, b, +, c, -, d}. I have tried ...
-2
votes
0answers
59 views
4
votes
1answer
102 views

How to transform a list (of sums) into list of summands

Suppose you have the list list={a,Sin[b+c],d+c}. What I want is to transform all elements of list with head ...
1
vote
1answer
91 views

Summation over list elements

As we know, one of the simplest way to do a summation (with special intervals) over list elements is using Sum[list[[i]], {i, 3, 8, 2 }] (*with steps of 2*) for ...
0
votes
1answer
94 views
9
votes
4answers
158 views

Faster position-based duplicate removal in a ragged array?

Take a ragged 2D array: rArray={{4, 2, 1, 0}, {2, 2}, {0, 0, 3, 3, 3}, {4, 0}, {3, 4}} I need to "deduplicate" this, where a duplicate is any element of a ...
0
votes
1answer
45 views

Eigenvalues and Eigenvectors Order [duplicate]

Say I have a list of eigenvalues and eigenvectors produced from a matrix $M$ using the command {eig1,eig2}=Eigensystem[M], which will return the eigenvalues with ...
0
votes
4answers
74 views

Cases vs Select, Pattern vs Pure function [duplicate]

What is the difference between having Cases with selection condition presented by pattern and a with pure function as condition? ...
2
votes
1answer
47 views

3D-Plot of a list of complex numbers and a list of real numbers

I'm a newcomer to Mathematica, and I'm having trouble with the following question. Say we have a list of complex numbers list1 and a list of real numbers ...
3
votes
1answer
92 views

Recursive list contruction

I am attempting to implement the exercises from The Little Schemer in Mathematica, and running to a bit of a challenge with rember (remove member). Given a list and a value, the function just returns ...
6
votes
5answers
156 views

Removing elements from a nested list based on their global count

I have a very large table containing sublists, such as for instance: {{1, 2, 3}, {4, 5, 6, 7}, {1}, {1, 8}, {9, 10}, {11, 6, 12, 13, 14, 15, 16}} I want to ...
11
votes
2answers
186 views

Fastest way to sum the upper triangle

I feel like this is an recurring question: if there's a symmetric matrix whose diagonal is not all 0, how could I get the sum of the part of it that's above the diagonal as fast as possible? Small ...
11
votes
1answer
583 views

When to use @@@ vs. /@ [duplicate]

So much thanks to Szabolcs in improving sequence.. for complete explanation. I am so glad to read all explanation which fundamentally remove the problem. But in number 4 of its explanation pointed to ...
5
votes
2answers
217 views

delete zero rows in a matrix

If there is a matrix with some of its rows equal to zero: (its zero rows are randomly distributed and does not have an ordered arrangement): same as: ...
1
vote
1answer
47 views

Adding up a list of subscripted elements [closed]

I have a list of entries with subscripts. I want to add just the entries. How can I do that in the presence of subscripts? For example: list = {1a, 2b, 3c} And ...
2
votes
3answers
87 views

How to compare and remove x-coordinates (and the associated y-coordinates) that are less than previous x-coordinates?

I am using Mathematica version 9.0 and am trying to compare and remove x-coordinates, and the associated y-coordinate, that are less than previous x-coordinates. Below is an example using sample data. ...
1
vote
1answer
38 views

Deleting duplicates of plus or minus symbolic quantities from a list [closed]

Let's say I have a list l = {a + bc - d, -a - bc + d, a + b};. Now I want to apply DeleteDuplicates[l, crit] to this list, such ...
3
votes
3answers
188 views
1
vote
0answers
44 views

Transform a vector DE into a set of scalar DEs [closed]

I have the vector equality: {{a,b},{c,d}}.D[{x1[t],x2[t]},t]=={{e,f},{g,h}}.{u1[t],u2[t]} I want to solve this using DSolve. ...