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

learn more… | top users | synonyms (3)

5
votes
1answer
169 views

What is the fastest way to maintain a large set of expressions?

In my algorithm I need to maintain a set (an unordered list of distinct elements) of expressions supporting two operations: Test an expression for membership in the set Adding a new expression to ...
2
votes
1answer
67 views

Adjust the results of evaluating Table so it can be used as a argument to Point

I have a list generated by Table as below. ...
0
votes
1answer
109 views

Displaying Values of Fuction at end of Period by Grid

My intention is to place the values of two function into a small box within my chart. To be more precise I have two vectors. A meanvector which shows the average value of all simulated stochastic ...
1
vote
2answers
288 views

Scatterplots for subsets of multivariate data [Updated]

Update/Re-write There has been a lot of ambiguity over what i'm am trying to do with this question so I have decided to give it a full rewrite. I'm really sorry for the confusion. If you want to see ...
8
votes
4answers
417 views

Partitioning a list by recursion (Programming Paradigms via Mathematica (A First Course))

I am working through the course Programming Paradigms via Mathematica. One of the homework exercises for the section Recursion I: Passing the Buck is as follows: Use recursion to partition a ...
5
votes
4answers
509 views

Combining the second elements of a set of ordered pairs based on their first element [duplicate]

I have a large set of ordered pairs and I am trying to add the second elements together for any group of pairs that has the same first element. For example my data looks like: ...
0
votes
1answer
137 views

Stopping- threshold and stopping- time of stochastic processes.

Rod Lm helped me to generate the following code, which I want to extend a little bit. So my intention is to use the threshold (the green line) as boundary in the following way: as soon as the process ...
1
vote
1answer
131 views

WeatherData acquirement in ListStreamPlot

I am trying to show the wind streams in a geographic area as following code for a range of time.Even if it works for realtime data but it doesn't work for range of time.I am filtering and also taking ...
0
votes
1answer
200 views

Brownian Motion with stopping threshold

I just want to generate one stochastic process, whereas I want to be able to manipulate the start value and the volatility. Furthermore, the process should stop when it reaches 5 However, as soon as ...
0
votes
1answer
87 views

order items of a table

I am trying to change order of a table. ...
1
vote
2answers
113 views

Select elements in a list when the firsts two items are the same (no matter order) and its third element is lower

I'm trying to solve a heuristic search in Mathematica 9. I get a list of succesor nodes called open with two nodes and a heuristic value, e.g., ...
1
vote
1answer
94 views

Expand list of {{t1,x1},…} with new set of t's

I have a list of the form data={{t1,x1}, {t2,x2},...} and a list newt = {nt1,nt2,...} and I want to expand ...
0
votes
1answer
229 views

ListVectorPlot3D

I try to plot a 3D Vector plot. All Vectors start at (0,0,0) and point in directions given in spherical coordinates: ...
0
votes
1answer
158 views

Problem with importing format of data from Excel?

I am trying to import data from Excel. It is located in a single column of the Excel file but each cell contains a comma separated pair of two values as a,b. When I am importing them I have this ...
2
votes
3answers
285 views

Introduction of straight Line into Manipulate function

I just want to implement a line within my chart that starts from time point 0 to time point T and whose y-coordinates can be manipulated, which in my case is represented by D. I tried to implement a ...
0
votes
1answer
82 views

Sublist inside simple list

I have a doubt to confirm. Let there is a list f = {{l}, {c}, {d}, {e}, {1, 2, 3}, {3, 4, 5}} And I expect it to be traversed as a normal list which I can do ...
4
votes
2answers
101 views

Specific rearrangement of elements in list

I have an $n\times n$ matrix G with elements g[i,j] that I construct with ...
0
votes
1answer
91 views

Making a list from equations

I want to make a list (efficiently) which is the set of lattice solutions of the following equations (depends on $k$): $x_0\geq 0$ and $x_i\in [0,4k]$ for $i=1,\ldots,4$ satisfies $x_0+x_3\leq k+3$, ...
0
votes
1answer
152 views

Problem with ListContourPlot feeding data format and WeatherData

With following code I am trying to show the mean wind speed patterns for a few geographic locations. ...
1
vote
2answers
511 views

How to find the position of non consecutive numbers?

Given a sorted table, how can I find the position of non consecutive numbers in the first column of the table? ...
3
votes
1answer
212 views

Removing sublists containing elements from another list's sublist

Let there be two lists that have sublists: a[] = {{1, 2}, {1, 2, 3}, {2, 3, 4, 4}, {3, 4, 4, 5}} and ...
4
votes
3answers
190 views

Renaming and indexing list of rules

I have a list of rules that represents a list of parameters to be applied to a circuit model (Wolfram SystemModeler model): ...
7
votes
2answers
245 views

Programatically adding/retaining comments within a nested list

Is it possible to convert the following list of strings to computable numbers with the comments preserved? ...
5
votes
6answers
262 views

Selective thinning of string elements in nested lists

I have a nested list similar to this example list (but much bigger and more messy): ...
0
votes
1answer
681 views

How to calculate the area of a listplot [duplicate]

I need to calculate the area enclosed in a two-dimensional listplot and following an answer to a similar question I tried this way: ...
2
votes
1answer
359 views

How do I sort complex numbers?

Okay, so I posted something about sorting, and it was linked as a duplicate to This post However, I am having problems trying to sort a list that contains both real and complex numbers. I put them ...
1
vote
3answers
136 views

How to convert a spaceless data into tab delimited

I have a data set in form of:(this is just an example) 1324501020 3241030205 4332020134 the data are stored in a text file (e.g. data.txt) but I need to convert ...
7
votes
3answers
274 views

Numbering nested list according with Depth (or Level)

(This question is slightly similar with Sequentially numbering a nested list, but not exactly the same.) What I want Say I have a nested list ...
1
vote
2answers
165 views

Indicating the probability that a weather datum is above/below some given value on a geographic map

With help of the previous questions here, I am analyzing weather data as daily MeanWindSpeed of some cities with the following code: ...
1
vote
1answer
106 views
2
votes
2answers
255 views

Create list via checkboxes

I am trying to achieve the following: Three (dynamically updated) Checkboxes (a, b and c) can be toggled on or off individually. Depending on their status, a ...
1
vote
1answer
126 views

Format Preservation of FullSimplify on Indexed System of Autonomous Equations

I currently have a large system autonomous differential equations. I've indexed a more managable dummy system of identical form, using Part to reference each ...
14
votes
1answer
169 views

Why changing list's head takes time?

Consider AbsoluteTiming[Range[10^7];][[1]] 0.035000 and AbsoluteTiming[HoldComplete @@ Range[10^7];][[1]] ...
4
votes
1answer
66 views

Optimizing List Multiplications

I've got a list manipulation optimization problem. Consider a two-dimensional nxm list list1, and a three-dimensional nxmxm list, ...
1
vote
0answers
60 views

Sorting Eigensystems [duplicate]

SO I have this code: ...
3
votes
3answers
198 views

Plot sublists as different colors

I have one big list with many sublists inside. All sublists consist of three numbers. For example: ...
3
votes
0answers
185 views

Exporting Specific Cells of Many Workbooks into One using Mathematica

I currently have a large number of detailed files from which I would like to extract certain cells' information to make an Archive spreadsheet. There are approximately 9 parameters of each ...
3
votes
1answer
138 views
3
votes
1answer
129 views

Filtering the elements of an array to split them into two categories

So, I am new to Mathematica, and I am trying to write something that involves taking values from one array and separating them into two different arrays. My code for doing this is: ...
1
vote
2answers
151 views

Counting a cardinality of a subset satisfying special property

Suppose that we have a set of 9 2-dimensional vectors $c$ by m=3; n=2; c=Tuples[Range[m],n]; We want to define a subset $S$ of vectors in $c$ by the following: ...
3
votes
2answers
764 views

Function returning Null along with other unexpected expressions

When I use some function, at the end along with the output I get some NULLs returned that I don't understand the reason for and are highly undesirable. For example, when I define the reversal of list ...
3
votes
1answer
186 views

Generating a list of all factorizations

What is the best way to generate a list of all factorizations of some number $n$? I'm quite new to Mathematica so this might be obvious. I have been trying some basic stuff with ...
3
votes
1answer
204 views

Indexing of Large Autonomous System of Equations for Use in NDSolve

I currently have a list of ~150 autonomous ODE's that I need to be able to work with using NDSolve. Fortunately I already have them formatted in plaintext, which ...
5
votes
3answers
220 views

Applying a function with the HoldAll attribute inside NestList

I'm trying to write an update function, which can be applied to a list and then to NestList it. As the function has to manipulate the given variable I figured I ...
2
votes
4answers
1k views

How can I create a list of functions?

Can anyone tell me, how to create a list of functions? I've tried the following code, but it doesn't work. ...
2
votes
1answer
116 views

Flat function with repeated sequence

There are functions like Join[ ] that accept a variable number of arguments. Join is a flat function, as the order of arguments ...
9
votes
1answer
266 views

Efficient way to solve equal sums $x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k$ with Mathematica?

I need to solve the system of equations, call it $S_1$, in the integers $$x_1x_2x_3x_4x_5 = y_1y_2y_3y_4y_5$$ $$x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k,\;\; k= 2,4,6$$ I used a very ...
5
votes
4answers
224 views

Tricky selection of elements based on their position

I need to make a list of some elements from a 4D array with dimensions 4x4x4x4. I need to select the elements based on their position in the following way: name an element e(x,y,z,w); I need all the ...
2
votes
2answers
119 views

Can you form a list with elements which are terms from an equation?

Is there a command that takes an equation as an input and creates an output with a list of terms in the original equation? Something like: ...
0
votes
0answers
39 views

Generating partitions of a set with a specified size of the parts [duplicate]

I tried the following (inspired by the answer here) myList = {a, b, c}; Needs["Combinatorica`"]; SetPartitions[myList] and I got this answer, ...