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

learn more… | top users | synonyms (5)

14
votes
0answers
431 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 ...
12
votes
0answers
232 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 ...
8
votes
0answers
149 views
8
votes
0answers
153 views

Efficient way to flatten or transpose-arrayreshape tensors

I have a tensor of dimensions $(2, 100, 100, 2, 100, 100)$ and I want to reshape it to a form of $(2*100*100,2*100*100)$, e.g. Flatten[A,{{1,5,6},{4,2,3}}]. If I ...
8
votes
0answers
121 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
465 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. ...
5
votes
0answers
57 views

SimilarityRules for SequenceAlignment of two lists

I am trying to use the SimilarityRules option of SequenceAlignment to customize its output. This works perfectly for strings, ...
4
votes
0answers
64 views

Create an adequate 'training set' to train a ClassifierFunction which performs the role of the built-in `SubsetQ`

I am trying to "grow" my own SubsetQ function using Machine Learning methods. My cSubsetQ when given two lists (listA and ...
4
votes
0answers
100 views

Bug in ListLinePlot[] when Filling up and down?

I'm trying to understand this apparently incorrect Filling behavior in ListLinePlot[]. Evaluating this ...
4
votes
0answers
122 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
264 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
74 views

Kernel crashes when computing finite difference mixed derivative with respect to y & z but works fine when computing with respect to x & y or x & z?

I am using Mathematica 10.4.0 on Ubuntu 16.04. I am trying to solve a set of differential equations using finite difference method on an NxNxN cubic grid (x, y, z directions). I am getting a weird ...
3
votes
0answers
57 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 ...
3
votes
0answers
449 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 ...
2
votes
0answers
69 views

Function output

I would like a function that computes Cartesian product of two sets z=(Tuples@{#1,#2}), and computes the number of elements in this set(list) ...
2
votes
0answers
91 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 ...
2
votes
0answers
76 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
70 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
114 views

ParallelTable and expensive functions

I would like to build up a 2D-Table using ParallelTable as follows ...
2
votes
0answers
268 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
76 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
472 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
43 views

List manipulation, averaging over lists and fidelity

I want to create vectors from a function poly[α_, β_, δ_, ϕ1_] were several variables (α, β, δ) are randomly sampled from a unit sphere. Then I want to vary another ...
1
vote
0answers
50 views

Estimating processing time for commands

I am trying to evaluate some equations by using Taylor series of expansion (Series[], ExpandAll[], and Normal[] command), and using n equation and n unknown (Solve). Following is not full command (if ...
1
vote
0answers
33 views

Using Coefficient for Conjugate[variables] (Mathematica ignores my assumptions)

I have a sum and I use Coeffcient[] to extract certain terms. For example, I want all term in the following sum that contain ...
1
vote
0answers
50 views

Concise use of list addressing

I very often work with Lists of Lists (trend data exported from other programs). Sometimes the start times of the important data ...
1
vote
0answers
61 views

Finding correct combination of functions

I am trying to write code where I have an array $S$ or numbers in any order [5,4,2,1,....] Then I have a specific set of functions that I can write. ...
1
vote
0answers
78 views

Lower memory usage and speed nested loops

I'm trying to make some tracking with Mathematica. ...
1
vote
0answers
50 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
62 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
74 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
102 views

Disease Network Model Using NDSolve

I have a basic disease model using NDSolve: ...
1
vote
0answers
41 views
1
vote
0answers
99 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
132 views

Autocorrelation of 3D Points

I'm trying to compute the autocorrelation of a list of points $(x,y,z)$ in 3D. Can the CorrelationFunction or maybe ...
1
vote
0answers
120 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
65 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
453 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
121 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
104 views

Optimized subset algorithm implementation

I was reading a paper from Mathematica Journal.It mentions a code for calculating subsets. ...
1
vote
0answers
160 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
30 views

Pass List / Vector argument through NDSolve to a function

I am trying to pass vector or list as argument to the function from NDsolve.And I am getting these error. Also I am pretty new to stack overflow. Apology if this a possible duplicate. Here is my code. ...
0
votes
0answers
26 views

factoring a phrase of matrix elements and calculating main eigenvalues

I have a question containg two parts: 1-If we have a matrix as ...
0
votes
0answers
39 views

Do[If[ *stuff* ]*arguments*]: Increasing range over which Do iterates changes results of If?

Summary: If I run the same Do[] expression but with the variable(s) over which I am iterating taking on more values (but same increment), an If statement inside the Do[] evaluates as false a few times ...
0
votes
0answers
31 views

Envelope of a given table (or plot)

Is there any way to construct an envelope of a given table (list) or plot? For example, I have plotted (used ListPlot of txt-file) And then I want to plot the envelope (upper or lower) of this plot ...
0
votes
0answers
78 views

How to Extract and Rearrange Elements in Doubly-Nested Lists

Hopefully any easy problem for you guys to help me with! I'm currently having an issue with writing some Mathematica code that will extract the each nth element in each array within a matrix, and then ...
0
votes
0answers
61 views
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 ...
0
votes
0answers
63 views

Select positive elements from a list of solutions

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

Make smooth plot from data

After some awesome tips from @qwerty I still have some doubts As I said, I´d Like to make a smooth function with some other colors, I plot the graph, there is a lot of data. The situation is this: I ...