Questions tagged [list-manipulation]

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

549 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
458 views

ParametricPlot - Several curves by different parameters

I am trying to plot a set of curves f(a,b,t) along t with a,b = -10, -9, ..., 9, 10. I can use Manipulate to draw 1 curve, and then change the curve shape by ...
H42's user avatar
  • 3,439
1 vote
0 answers
138 views

Specifying the number of points sampled by NDSolve, and the meaning of "steps"

I am working with lists generated from interpolating functions given by NDSolve. Manipulating the lists, I encountered a problem - the lists, of course, need to be ...
Whyka's user avatar
  • 111
1 vote
0 answers
79 views

How to plot data from table dynamically, without knowing how many columns are there?

I'm trying to read coordinates at certain times of Planets and Plot the orbit into a graph. For this example I'm doing this for eight planets, some coordinates from a table of some timesteps of the ...
T-Dog's user avatar
  • 33
1 vote
0 answers
70 views

Problem using ConstantArray in FindRoot

I ran into a strange problem, where using ConstantArray inside FindRoot results in a ...
Chris K's user avatar
  • 19.6k
1 vote
0 answers
95 views

Finding the main phases of the Moon in a particular month

My aim is to build a function that has parameters month and year and returns four lists, namely with the dates of the new moon, first quarter, full moon, last quarter. This is more possible after ...
Veliko's user avatar
  • 349
1 vote
0 answers
89 views

TickMarks get different length inside function plotGrid

Mathematica 11.2 or earlier: I want to create a grid of plots and found this one by Jens excellent: https://mathematica.stackexchange.com/a/6882/245 : ...
hgrie's user avatar
  • 11
1 vote
0 answers
71 views

Efficiently transform sequentially generated integer matrices into boolean matrices

Assume you have a list of 5 numbers, eg L = {14, 7, 11, 14, 0};. Now, what you want to do with this list, is to transform each entry into eg a binary list, using <...
user42582's user avatar
  • 4,185
1 vote
0 answers
169 views

Removing zeros from a list of equations

I am setting up a matrix system of differential equations that need to be solved. Some equations are redundant, and I have removed them using UpperTriangularize[]: ...
Julius's user avatar
  • 337
1 vote
0 answers
62 views

Delete duplicates in a list compiled of different lists and also delete

I've got three lists: Lst1 has 100 different values for "r". Lst2 has 100 different values for "a". And Lst3=Pi*Lst1^2*Lst2. In Lst3 I've got duplicates and I want ...
Cornelis's user avatar
1 vote
0 answers
180 views

Proper syntax for DeleteCases with conditions

List is an array of dimensions {61777, 3}. dist1 & dist2 are RegionDistanceFunctions. Using: ...
Giovanni Baez's user avatar
1 vote
0 answers
66 views

Using lists to access tensors like in MATLAB

I have a tensor of a variable size as an input to a function in which I need to access specific elements. Because the order of this tensor is variable, notation: ...
konovification's user avatar
1 vote
0 answers
132 views

Computationally Employ Sum over Ordered Partitions?

I have the following function defined, with two inputs $g$ and $h$: ...
Benighted's user avatar
  • 1,327
1 vote
0 answers
187 views

Format of numbers in a list

I wrote the below lines: rang1 = Range[0.0, 0.4, 0.02]; rang2 = Range[0.5, 1.0, 0.1]; caten = Catenate[{rang1, rang2}]; I see ...
Inzo Babaria's user avatar
  • 1,503
1 vote
0 answers
91 views

Exporting lists to text files with specific names

I am working with two matrices (because I have more matrices with indices (1,2,3,...) I write them below in specific format i. e. ...
Inzo Babaria's user avatar
  • 1,503
1 vote
0 answers
209 views

Extract coefficients from CoefficientRules

So CoffeficientRules[] gives a vector {E1->c1,..., En->cn} for the N monimals Mi in the polynomial P = M1+...+Mi I would like to separate the coefficients ...
Martin's user avatar
  • 21
1 vote
0 answers
95 views

Iterate over values in a table only if they are in a region

I made some pretty simple PDE's in non-square regions, and I am attempting to output the data (t, x, y, funcval) out to a .csv file (I know, terrible format for this, but it was a requirement for the ...
Escap3faith's user avatar
1 vote
0 answers
205 views

Fill grid with list data

I have the following list: list = {{114}, {59, 55}, {31, 28, 27}, {17, 14, 14, 13}} The list data should be placed into a ...
lio's user avatar
  • 2,356
1 vote
0 answers
84 views

EmbedCode not evaluating a list of Manipulates

I have created a simple FormPage that asks for some user input, and should display a list of manipulates which are influenced by the given input. I use EmbedCode to display my results. The code I used ...
user3423641's user avatar
1 vote
0 answers
72 views

indexing matrix computation by lists

I have a list of triangles stored as indices into a list of vertices: ...
Beginner's user avatar
  • 433
1 vote
0 answers
45 views

Problem with adding multiple tables from imported text file

Im having problems with performing operations on imported files and it is outlined as follows: $1.$ Because of memory constraints on my computer, I used export that saves each iteration into a text ...
anonymous's user avatar
  • 433
1 vote
0 answers
409 views

Accessing table extension in FITS file

I have a FITS file here that has no image but simply has a binary table in its extension. I have tried using Import["file","Tabledata"] but it returns an empty ...
Sunil S.'s user avatar
  • 135
1 vote
0 answers
81 views

AirportData, GeoNearest and filtering data

I bought a Raspberry Pi, which introduced me to Mathematica, and I'm just diving in. I'm guessing my question is really a basic syntax question, but I don't know how to unravel it. I thought I would ...
Brian's user avatar
  • 11
1 vote
0 answers
93 views

Time-stepping an equation in Mathematica

I have an iterative integral equation of the form $$n(k,t+dt)=n(k,0)+dt\int_{0}^{\infty}dp\int_{0}^{\pi}d\alpha\int_{0}^{2\pi}d\beta\int_{0}^{\pi}da\,p^{2}q^{2}\sin(\alpha)\sin(a)\frac{(n(p,t)+1)}{\...
user35305's user avatar
  • 291
1 vote
0 answers
362 views

Assigning Values of Indexed Variables to Arrays

New to mma. I have assigned the results of using Solve to solve 5 variables to 5 indices of a new variable: ...
aiwass's user avatar
  • 63
1 vote
0 answers
45 views

A problem of presentation of a matrix product inequality

I have 4 vectors or matrix aa = {{a[1,1],a[1,2]},{a[2,1],a[2,2]}} xx= {x[1],x[2]} bb = {b[1],b[2]} c = {<=, <=} can I find an operation which gives ...
cyrille.piatecki's user avatar
1 vote
0 answers
239 views

Problem with the calculation of Lyapunov exponents

I am trying to calculate the Lyapunov exponents for the orbit of two bodies around each other. Therefore, I use the following code: ...
Aaron Wild's user avatar
1 vote
0 answers
173 views

Plotting 3d lists with large data sets more efficiently

I have been trying to plot a set of 3D points using ListPlot3D. The list is very large, in fact Mathematica is even taking an excessive amount of time to calculate ...
swolephysicist's user avatar
1 vote
0 answers
44 views

NMaximize over a Large List: No Output

I have a list of 500 sublists of the form: ...
Junaid Aftab's user avatar
1 vote
0 answers
106 views

calculate new table from values of old table and find fit model curve

I'm new to mathematica and I'm struggling to figure this out. I have a file with 6 space separated numerical data columns. Column 3 and 4 are the x and y values of the real data, column 5 and 6 are ...
Matthias's user avatar
1 vote
0 answers
53 views

Arrange of several files

I am struggling to import my data. There are 400 files in CSV format with names organised by date like: Table1_20111003_YYYY_MM_DD_0000.dat. In each file over 20 colums and 86400 rows (seconds of ...
Rafaella Chiarella's user avatar
1 vote
0 answers
40 views

Partial Sum of Binary Sequence not Working

I have the following code: ...
partseq's user avatar
  • 11
1 vote
0 answers
85 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 ...
Scott R's user avatar
  • 121
1 vote
0 answers
112 views

Find best convex approximation of an "almost convex" function

I've got values of a function of two variables at integer points inside a rectangle, that is, a rectangular table $f(i,j)$, $1\leqslant i\leqslant m$, $1\leqslant j\leqslant n$. The function is very ...
მამუკა ჯიბლაძე's user avatar
1 vote
0 answers
56 views

Simplify expression?

Suppose I have expressions that involve terms like: p1.p1+p2.p2+p3.p3+p4.p4 p1, p2, p3, and p4 are all elements of an array: ...
naomig's user avatar
  • 343
1 vote
0 answers
73 views

NIntegration and DSolve with same variable

I need to solve this problem: Then follows the code, with: ...
Melina A.H's user avatar
1 vote
0 answers
53 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 ...
jak's user avatar
  • 940
1 vote
0 answers
56 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 ...
John Morganthau's user avatar
1 vote
0 answers
91 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. ...
Stephen Hill's user avatar
1 vote
0 answers
46 views

Defining an object which is function in some variables and tensor in some other indices

I am trying to define an object which function in some variable and tensor in other indices. My attempt at it was: ...
Krishna Tripathi's user avatar
1 vote
0 answers
162 views

Lower memory usage and speed nested loops

I'm trying to make some tracking with Mathematica. ...
Alx's user avatar
  • 3,612
1 vote
0 answers
62 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 ...
Ambrose Chau's user avatar
1 vote
0 answers
181 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 ...
Hedin's user avatar
  • 93
1 vote
0 answers
78 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 ...
Sid's user avatar
  • 977
1 vote
0 answers
295 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 ...
Tom's user avatar
  • 3,366
1 vote
0 answers
158 views

Disease Network Model Using NDSolve

I have a basic disease model using NDSolve: ...
Schwarz's user avatar
  • 363
1 vote
0 answers
229 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 ListCorrelate...
s0rce's user avatar
  • 9,572
1 vote
0 answers
79 views

Make a table of changes in US coinage

I thought of an innovative use of Mathematica/Alpha that I think Stephen Wolfram would really love, but I can't figure out how to get it to work. The idea is to make a table that would chart the ...
Tyler Durden's user avatar
  • 4,048
1 vote
0 answers
91 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 ...
Baxter's user avatar
  • 11
1 vote
0 answers
117 views

Generating the set of all three-dimensional binary arrays distinct under rotation and reflection?

How can I automatically generate all possible three-dimensional binary arrays of size $(x_1 \times x_2 \times x_3$) where each array is distinct from all others with respect to rotation and reflection ...
user12759's user avatar
1 vote
0 answers
502 views

Making simultaneous equation solving more efficient

I am trying to solve a system of several simultaneous equations that have been generated by a series of modules and functions, using this module: ...
CJO's user avatar
  • 33

1
3 4
5
6 7
11