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

learn more… | top users | synonyms (4)

11
votes
0answers
345 views

Learning Resources for Data Science in the Wolfram Language

I'm delivering an upcoming course on Data Science with the programming/analysis done predominantly in the Wolfram Language. I created the following table to leverage students' familiarity with Lists ...
11
votes
0answers
190 views

Strategies to find curves on messy data using FindCurvePath

I have a set of data points that correspond to roots of a transcendental equation with respect to a parameter (the abscissa) which, by the properties of the system, define continuous curves (might be ...
9
votes
0answers
239 views

How to merge Datasets representing matrices with named rows/columns?

I am working with square (non-symmetric) matrices with named rows and columns. The data I receive is sometimes messy and rows/columns may come in various permutations. I usually need to ...
9
votes
0answers
258 views

Using Compile to speed up Function with PermutationProduct

I have the following fairly simple routine dot involving PermutationProduct that I wish to speed up using ...
8
votes
0answers
111 views

TimeConstrained[Delete[Range[1],1]] causes kernel crash

Run these two samples of code here (AFTER SAVING YOUR CURRENT WORK): Do[ TimeConstrained[ While[True, Delete[{1}, 1]; ];, 0.1];, {100}] ...
6
votes
0answers
68 views

Listable compiled functions used in NMinimize

This is an example from MMA: cListable = Compile[{x}, (x-1)^2, RuntimeAttributes -> {Listable}] In case of single entry: ...
5
votes
0answers
296 views

How to download and combine S&P 500 stock prices

I want to download historical S&P 500 stock prices and combined them into one big file, having only one column of date referencing all stocks. Here is what I have do so far. ...
4
votes
0answers
104 views

Gather dependency on list order?

I get intrigued about Gather behavior on this post. I thought that Gather was invariant under list order? Here is the result I ...
4
votes
0answers
237 views

Strange behavior of undocumented RawArray and ArrayObject expressions

I discovered several strange results and inconsistencies while trying to understand what undocumented RawArray and ArrayObject ...
3
votes
0answers
78 views

speed up evaluating a listable function

I apologize in advance for the vagueness, but I can't think of a more descriptive title. I am trying to find the average value of the square of BesselJ[0, x] ...
3
votes
0answers
104 views

Why is Thread[{ a, b }] the same as Transpose[{ a, b }]?

I understand the idea of both Thread and Transpose, but do not understand whatever nuance it is that makes Thread[{ a, b }] == Transpose[{ a, b }] Where ...
3
votes
0answers
70 views

Partitioning Table

I have a long vector array in the following format: ...
3
votes
0answers
355 views

Taking real and imaginary parts of indexed functions and speeding up ComplexExpand

I am setting up a large system of ODEs and in order to use the IDA method (which is sig. faster for my system and thus attractive), I must split my equations into real and imaginary parts. I am ...
3
votes
0answers
210 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 ...
2
votes
0answers
57 views

Compilation of a function that needs to call Subsets

I'm working on a code that runs many (easy) operations on combinations (subsets) of different size (6, 7, 8, 9) taken from a big set of numbers (normally more that 40). So, this means the code has to ...
2
votes
0answers
65 views

Choosing a List as VertexWeight for a TreeGraph

I would like to map every vertex of my TreeGraph to an List. ...
2
votes
0answers
104 views

ParallelTable and expensive functions

I would like to build up a 2D-Table using ParallelTable as follows ...
2
votes
0answers
217 views

Faster Ways to compute recursive summation

It takes a long time to compute the summation below, and I'd like to know if there are some better ways to compute things faster. I have used $3$ ways to calculate, but they are very unsatisfactory. I ...
2
votes
0answers
73 views

The number of real values assumed by combinations of complex roots of a decic

Define complex conjugate as the pair of complex numbers $a+bi,a-bi$. Assume you have 5 such pairs and they are the 10 roots $x_i$ of a 10th-deg equation with integer coefficients. In general, how many ...
2
votes
0answers
306 views

Derivatives of list elements

Could someone explain the odd behavior of the Derivative function when drawing arguments from lists? We have, ...
2
votes
0answers
405 views

Generating a function which outputs possible chemical reactions

I want to make a list of chemical reactions and I write them down in a $\require{mhchem}\LaTeX$ format. They are of the following form $$NA_n^i+MB_m^j \rightarrow \hat NA_{\hat n}^{\hat i}+\hat ...
1
vote
0answers
40 views

Generate a list of values of a function for each value of the parameters already found

The following question is an extension of this question Find all roots of a function with parabolic cylinder functions in a range of the variable. Now I want to use the roots found to calculate a ...
1
vote
0answers
51 views

Problems with indexes in a Do-cycle and CoefficientArrays

I have a system of linear equations with variables $A_n$ and need its coefficients in a matrix form (Transform linear system into a matrix form). I'm trying to do that through a ...
1
vote
0answers
54 views

Fast construction and reshaping of large tensors

I'm trying to construct a large matrix which is derived from some higher rank tensor (the rank of interest to me changes case by case, so it needs to be a general method). Currently, the process of ...
1
vote
0answers
43 views

Tracking solutions over a Brillouin zone

Thanks to @bbgodfrey I have a function that finds the two solutions to a set of equations bounded by a hexagonal region (corresponding to the Brillouin zone). It takes the angle ...
1
vote
0answers
91 views

Disease Network Model Using NDSolve

I have a basic disease model using NDSolve: ...
1
vote
0answers
40 views

Substitution does not work while substituting with a value from list

I am writing a program which iteratively solve and make substitution from a list. As I have shown in the code substitution works when I enter the value directly (Input 100). When I extract the same ...
1
vote
0answers
74 views

Find algorithm or generator formula with automated procedure and pattern recognition

I am trying to find a generator formula for the discriminant of a polynomial and believe it would be an interesting problem for the Mathematica community to know how to automate evaluation of certain ...
1
vote
0answers
108 views

How to create a complex variable from dated list values

Can anyone help me to construct a variable "PI" from values of variable x. Variable x represents a group of two time series rj and ri on equal dates(joined two dated lists with states).Variable x have ...
1
vote
0answers
139 views

How to sequentially select, from a large set of tuples (of matrices), those with a certain property

I'm interested in finding a computationally efficient way for selecting all tuples of matrices which have a certain property. The property I'm interested in is that I want the column sum, of f[the ...
1
vote
0answers
52 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
1
vote
0answers
325 views

Convolve two sets of (x,y) data sets

I have two sets of data in the form a={{.1,2},{.2,3},{.3,4},{.5,6}} b={{0,8},{.1,4},{.2,7},{.3,1},{.5,10},{.6,3}} Both data sets have even spacing, although ...
1
vote
0answers
105 views

New list generated from the sum of elements taken from two lists

I have been using mathematica for a while, but I have problem wrapping my head around list manipulation functions. I would appreciate any suggestions. Here is what I want to do. ListV is a list of ...
1
vote
0answers
271 views

Using Part within a Compiled Command

I'm looking to define a multi-line function that makes use of the "Part" command. A toy example: ...
1
vote
0answers
99 views

Optimized subset algorithm implementation

I was reading a paper from Mathematica Journal.It mentions a code for calculating subsets. ...
1
vote
0answers
151 views

Why doesn't ParallelMap improve the performance of FoldList?

This question arose during my analysis of the following problem: filling gaps. (The code used here is Simon Woods's work.) FoldList seems to not cooperate with ...
0
votes
0answers
15 views

Transform a vector DE into a set of scalar DEs

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. ...
0
votes
0answers
26 views

How to show different DateListPlots with a popupmenu with different plot parameters

I bumped into the following problem: I have a relatively large dataset (250k row,11col), imported in from an SQL database. The format of the data is {{year,m,d,h,m,s},value}. I have successfully ...
0
votes
0answers
32 views

Dot production associated with comparison process of different matrices eigenvectors

With thanks to Guess who in the link module using.. We created functional 5*5 matrices: ...
0
votes
0answers
54 views

Switching ArcTan argument from a sequence to a list

The objective is to determine the angle formed by the line connecting two points in the plane, say p and q. The ...
0
votes
0answers
60 views

Inverse Superposition

There are 4 tables that, I have written them as bellow: (m, n, s, and r are orthogonal basis. r.r=n.n=m.m=s.s=1, and m.n=n.r=...=0). a's, b's, c's and d's are coefficients and are numeric values. ...
0
votes
0answers
41 views
0
votes
0answers
63 views

Equation Autogeneration

The following is resubmitted as edit here to reflect suggested formatting corrections so indentations separate the lines neatly. I also fixed the unknown D variable which I actually meant to state as ...
0
votes
0answers
45 views

Output of List formatted strangely

I'm running a monte carlo simulation which uses random input data and performs calculations on it, and then outputs a 100 by 100 sized array with my data. The code works without a problem but for some ...
0
votes
0answers
43 views

FinancialData, comparing returns accounting for different holidays

At the moment I am trying out the FinancialData feature of mathematica. I am a bit struck with the problem of dropping returns for dates of a list of different stocks not being equal for all stocks ...
0
votes
0answers
62 views

Adding error bars in bar chart using a list

I know this must be a very basic question, but I don't know much of Mathematica and was not able to find any answers online. I have imported an Excel file with two sets of values. ...
0
votes
0answers
60 views

Data manipulatation with MapAt and Join

I would like to make data like: {{a1, a2}, {b1, b2, b3}, {c1, c2}, {d1, d2, d3}} -> {{a1, a2, b1, b2, b3}, {c1, c2, d1, d2, d3}} by using ...
0
votes
0answers
51 views

How to efficiently find period orbits in a series defined by recurrence relation?

I have a series defined as $z_{n+1} = z_n^2 + c$, which is the series for the Mandelbrot set. I have defined it, in order to plot the set, as ...
0
votes
0answers
40 views

Constructing a function for expanding general $n$ products

I have the following quantum mechanically motivated product: $\langle0\vert(A_1b_1 + A_2b_2 + A_3b_3)(B_1b_1 + B_2b_2 + B_3b_3)(C_1b_1 + C_2b_2 + C_3b_3)$, where $b_i$ is an annihilation operator ...