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
411 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
223 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
139 views
8
votes
0answers
119 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
415 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
53 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
57 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
121 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
253 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
50 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
51 views

Problem with MissingDataMethod

Given v = {2, 1, Missing[], 5, 7, 4}; I use EventSeries to replace the missing value with its predecessor ...
3
votes
0answers
418 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
66 views

Bug in ListLinePlot[] when Filling up and down?

I'm trying to understand this apparently incorrect Filling behavior in ListLinePlot[]. Evaluating this ...
2
votes
0answers
89 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
73 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
68 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
112 views

ParallelTable and expensive functions

I would like to build up a 2D-Table using ParallelTable as follows ...
2
votes
0answers
258 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
75 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
448 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
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
48 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
57 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
29 views

Fast arithmetic on matrix elements

I have a square matrix $U$ of dimension $L\times L$, I am interested in the following quantity $U_{1,j}U_{2,k}U_{3,l}U_{4,m}\cdots U_{L,q}$ summed over all permutations of the letter indices, ...
1
vote
0answers
81 views

How to get the values out of Alternatitves?

Saying we have something like: SomeFunction[ ... { Alternatives[1, 2, 3] :> "something" } ... ] How can I know if ...
1
vote
0answers
72 views

Lower memory usage and speed nested loops

I'm trying to make some tracking with Mathematica. ...
1
vote
0answers
49 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
60 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
60 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
100 views

Disease Network Model Using NDSolve

I have a basic disease model using NDSolve: ...
1
vote
0answers
90 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
125 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
117 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
60 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
422 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
118 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
103 views

Optimized subset algorithm implementation

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

Generating a List of Numbers with “Table” Causing Deviation

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

Approaching infinity

I'm using Mathematica to visualize the autocorrelations of all kinds of wave-types. Obviously, my waves aren't infinite and don't have infinite periods though, so the autocorrelation I get is a ...
0
votes
0answers
62 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 ...
0
votes
0answers
53 views

(Sparse Array) Can Mathematica delete some of the 0's from a list?

This question continues form Can Mathematica delete some of the 0's from a list? This time I want to delete zeros before the first positive integer. I have a list: ...
0
votes
0answers
46 views

Can't operate on vector within a list of rules

I'm trying to set up a list of rules which includes the following: ...
0
votes
0answers
77 views

Nestlist inside Compile

My question is a continuation of question1 and question2, but I think it may be considered as a self-contained one. I am interested to make the following code faster ...
0
votes
0answers
28 views
0
votes
0answers
86 views

Home Loan Calculator with Variable Interest

I have to make a calculator for a home loan and currently the interest rate is fixed (constant for the entire period of the loan) How can I make the sliders on manipulate so that after each period of ...
0
votes
0answers
73 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
38 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
75 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
50 views