Questions tagged [list-manipulation]

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

548 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
0 answers
97 views

How to create a listable, memoized function

Suppose I have a known real constant $a$, and I want to calculate $f(n) = \prod_{k=1}^{n}(a-k)$. I know I could memoize this function ...
FalafelPita's user avatar
0 votes
0 answers
77 views

How do I plot multiple lists that were assigned variables created in an iterative fashion from a larger matrix?

I have a 70x16 array of values ("DATA22K") imported from a .xls spreadsheet, with the x-values (time) being column 1, and the fluorescence intensities of 15 samples (over time) being columns 2 thru 16....
JMart's user avatar
  • 1
0 votes
0 answers
280 views

Limit of a List

Is it possible to take the limit of a list instead of using the Limit method? I'll try to explain what I mean. I am generating a list of numbers that converge to some number. The generated numbers ...
Anthony's user avatar
  • 153
0 votes
0 answers
88 views

Distance between points in a 3d data given a direction

I'm trying to group the points in a given direction as a function of the distance between each point, and then apply a function to the third coordinate. But I can only get these two directions, using ...
user avatar
0 votes
0 answers
55 views

Exporting a large number of image variables in mathematical 11

I used the following code to import a large number of tiff images into notebook. ...
Shriram Bobbili's user avatar
0 votes
0 answers
153 views

How to draw local trend lines and divergence lines?

Here are two lists as lstClose and lstCCI, the lstCCI is computed from ...
Jerry's user avatar
  • 2,409
0 votes
0 answers
172 views

Designing a Manipulate Block

I am trying to create a Manipulate block which contains tabels, graphs and explanations. In the first row I want to add some tables and explanations, but sometimes the tabels are cut. For doing this I ...
kobibo's user avatar
  • 215
0 votes
0 answers
65 views

How to iteratively change RGB style in Show[Table[ListPlot[...]]] and create a Legend?

I am trying to plot the outputs of a ListPlot with different colors for the 3 different cases and create a legend. I have tried with a simple For cycle, but then ...
Andrea G's user avatar
  • 739
0 votes
0 answers
249 views

A Table of Sums, but faster

I'm trying to calculate the following lists a_j and b_j from some predefined values. (this is not code, it's just supposed to be a mathematical expression) ...
laudiacay's user avatar
  • 562
0 votes
0 answers
121 views

Output in table form with 10 digit precision

I am trying to generate tabular output for the following code. I am trying to solve transcendental equation and I am using FindRoot to solve this equation. ...
Raj's user avatar
  • 95
0 votes
0 answers
210 views

Export list and NumberForm

Say I have the following code ...
Jim's user avatar
  • 67
0 votes
0 answers
139 views

Extracting Data from For Loop

I want to add phases in for loop and after adding a new phase I want to export this data? How can I do this? Can you show me where I do wrong? ...
halil ibrahim Binici's user avatar
0 votes
0 answers
80 views

An array of function values over the region $\{(x,y): -1\le x,y\le 1\}$

I had one of my colleague instructors ask me how to evaluate the function $f(x,y)=x^2+2y^2-x$ over a few points in the region $\{(x,y): -1\le x,y\le 1\}$ and display them in table form with headings ...
David's user avatar
  • 14.8k
0 votes
0 answers
146 views

ArrayPlot with blended color

I have two ArrayPlot and I would like to show using one legend. The flowing is works. My question is can we use ...
OkkesDulgerci's user avatar
0 votes
0 answers
37 views

Selecting few arrays from a list and displaying their content

I am using FeynHiggs package on Mathematica 11 to calculate fermion masses in MSSM. Function FHGetPara[] returns a list that ...
solphy101's user avatar
  • 337
0 votes
0 answers
78 views

How to build a list nesting if statements

Let's say I have a function f[i_,j_] $i$ and $j$ take integer values. $i$ can range from 1 to 20. For any given integer i (between 1 and 20), as you increase $j$ ...
PhoenixPerson's user avatar
0 votes
0 answers
48 views

Inconsistencies in the Timing of evaluation of equal-sized lists

If I read data from a data file and manipulate the list and do some calculations. The resulting is a list of dimensions: Dimensions@δx {16, 59210} Then I create ...
atapaka's user avatar
  • 3,733
0 votes
0 answers
59 views

built-in functions with one argument

I want to find the (NumericFunction) built-in functions that take exactly one document. ...
Dimitris's user avatar
  • 4,784
0 votes
0 answers
396 views

ParallelTable and Table give different results

I am trying to parallelize a table operation, but I find that the table is not the same with and without the parallel function. I have looked at this question, but I cannot transfer it to my own ...
Kaspar H's user avatar
0 votes
0 answers
61 views

Sequentially generate elements of Mathematica-generated list

Mathematica has a number of built-in functions that generate lists, such as Permutations. Is there is universal way to generate only portions of these lists at a ...
GregH's user avatar
  • 1,765
0 votes
0 answers
40 views

ComposeList not building the expected list of compositions

Starting with: ...
James T.'s user avatar
0 votes
0 answers
99 views

FindRoot inside Flatten Table

I want to evaluate a function that depends on parameters and on another function that, by its turn, also depend on the same parameters. For example, let's say I have f(x(a,b);a,b), where a and b are ...
Laura K's user avatar
  • 383
0 votes
0 answers
97 views

Roots of cubic polynomial when a coefficient is an infinite list

I would like to have an expression of the roots of a cubic equation of the type $x^3+ \gamma x^2 + kx = f(k)$ where $\gamma \in [0,1]$, $k$ is an integer and where $f(k) = \{|k|,|k|+2, |k|+4,...\}$. I ...
inquisitor's user avatar
0 votes
0 answers
88 views

Correct Loop to use for Repeated Applications of /. Rule?

I have a $n\times n$ table (matrix). Let's just say $n=2$ but it is arbitrary. It has a smattering of indexed coefficients, see below for example. ...
Camilo's user avatar
  • 85
0 votes
0 answers
172 views

Tuples with restrictions

SHORT VERSION Given 2t Ranges, each of length len, what is the fastest way of finding the ...
Marius Ladegård Meyer's user avatar
0 votes
0 answers
57 views

Formatting Infinities in a Table

What is the correct method to replace all types of infinity e.g. ComplexInfinity that are present in a Flatten ...
Alexander McFarlane's user avatar
0 votes
0 answers
51 views

output has a term uncomputed

I am trying to sum the all numbers in each row of matrix and divide them by the max value of the row. My output has the following terms that has not been computed yet (example, the second element in ...
sc3339's user avatar
  • 23
0 votes
1 answer
330 views

Easier way to input Dynamic matrix?

I've only been using MMA for a month, and I'm working on making interactive Linear Algebra examples that will be used online for students. Right now, for inputting numbers into a matrix, I've been ...
J_Nat's user avatar
  • 336
0 votes
0 answers
222 views

Henon Map Equation Trekker

I am trying to make an Equation Trekker for the Henon map in the following way: ...
Bazinga's user avatar
  • 737
0 votes
0 answers
516 views

Use If condition with ListPlot

Here is my code to use If condition with PLot: ...
S.S.'s user avatar
  • 350
0 votes
0 answers
204 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 ...
dcvilela's user avatar
0 votes
0 answers
100 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: ...
Dan Goldwater's user avatar
0 votes
0 answers
82 views

Time needed to solve NIntegrate is much longer than what I was expecting

I'm trying to do the following list: tablevdip = ParallelTable[{x, y, Vdip[x, y, 6]}, {x, -1, 1, .5}, {y, -1, 1, .5}];] with ...
hrmello's user avatar
  • 117
0 votes
0 answers
171 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 ...
Dmitri's user avatar
  • 522
0 votes
0 answers
253 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. <...
Unbelievable's user avatar
  • 4,787
0 votes
0 answers
133 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 ...
Travis Arlen McCracken's user avatar
0 votes
0 answers
138 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 ...
Tobia Tesan's user avatar
0 votes
0 answers
99 views

Matrix iteration failing after second step

I am calculating 11x6 matrix using different logics as in below code. Problem is in Do loop in below code where I have two different criteria to update matrix "fd". I am expecting logic in IF which ...
Kausik's user avatar
  • 197
0 votes
0 answers
75 views

How can I get the covariance result cumulatively?

I am trying to derive the covariance results for a $n \times 4$ matrix where $n$ is an arbitrary number. I am trying to derive the covariance for each row cumulatively. For example, I am trying to ...
Eric's user avatar
  • 219
0 votes
0 answers
80 views

Improve performance of processing transactions in a large file

I want to work with a table which has 296,705 transactionslines and 172,147 transactions. ...
Michiel van Mens's user avatar
0 votes
0 answers
246 views

Improving the speed of evaluating Table with nested functions

I am a Mathematica novice working with a stack of 1024 x 1024 WatershedComponents (or MorphologicalComponents) label matrices ...
user13999's user avatar
  • 907
0 votes
0 answers
104 views

How to compute variances from a matrix/table

I have created a matrix/table with an imported dataset. I want to know what the variance is for 3 values at a time but across 68 columns. I would like to do this in an automated way rather than 1 set ...
Palaeoanth's user avatar
0 votes
0 answers
121 views

Optimization of vector manipulation

I'm trying to implement an upwind scheme for solving transport equation (at first, I work with no right hand side and the simpliest case possible - velocity is constant, initial data is smooth, etc). ...
TZakrevskiy's user avatar
0 votes
1 answer
62 views

How to find all functions that accept level specifications as an argument?

How can I find a list of every function that takes a level specification as an argument?
Peter Burbery's user avatar
-1 votes
1 answer
191 views

Why can”t I get a smooth curve?

I used "Table" to calculate and plot the following complicated function. First, we choose an initial value for $G$ and other parameters, but at later times $G$ changes with function $I_a$. ...
Saeid 's user avatar
  • 751
-1 votes
1 answer
82 views

Picking phase terms out of an exponential

I need to pick out certain terms from a sum of exponentials. For example, in the sum below: $a + b e^{i\,\Delta\,t} + c e^{ i( (\Delta + \Omega) t + \varphi_{0})} + \Delta e^{i\,\delta\,t + \varphi_{...
Jaffe42's user avatar
  • 185
-1 votes
1 answer
108 views

How to construct a matrix composed of a subset of column of multiple .cvs files

Suppose I have a lot of .cvs files in a directory. All have the same structure and the first column is a column of dates --- their length is not necessarily equal. For instance, say I have two files ...
cyrille.piatecki's user avatar
-1 votes
1 answer
44 views

Take a scaled or proportional amount of a list

Is there a built-in method to do something like Take[list,Scaled[.7]]?
Philip Maymin's user avatar

1
7 8 9 10
11