# Tagged Questions

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

52 views

### (Cartesian product) How to get the coordinate of points while each coordinate of each axis is known? [duplicate]

For example, I have data like this: m = {{1,2,3},{4,5,6}} It means 1,2,3 are available x position, 4,5,6 are available y position. The question is, how to get ...
32 views

### Map a list of functions to a number [duplicate]

Suppose I have a list of functions like: listfun = { Sin, Cos, Tan } And suppose I want to map listfun to a single number <...
60 views

### Generating matrix of distances between points in cylindrical coordinates

I am working on an analytical model for the sound intensity generated from a vibrating cylinder. Part of this work requires me to split the cylinder up into a number of elements, with the more ...
37 views

### Removing every member of a list from another list [duplicate]

I have a list of lists A={{1,2},{3,6},{7,8},{5,0}}, and another list of lists B={{1,2},{5,0}}. If any list in B is also in A, I want to remove them from A. E.g.,Taking {1,2} and {5,0} out of A to get ...
56 views

### How to Set Priority Between Longest and Shortest [closed]

As is shown in this post's answer, it seems that though you can set priority of Longest (or Shortest) by ...
57 views

### Time series of a point using ImageFeatureTrack

This question regards tracking, however it is more about writing efficiency in mathematica compared to other programming softwares. I get the tracking of a point between two movie frames by: ...
81 views

### Longest and Shortest won't work in ReplaceList?

I'm trying to make a pattern that's easy to preceive by human but hard to write out by Mathematica when I came across this problem. (Check the original problem here) Let's check this simple case: I'...
42 views

### Diagonal part of product of matrices

I am trying to find the best way to compute only the diagonal part of a product of two (or three) matrices. I tried two different approaches: computing the standard matrix product and then extracting ...
332 views

### Maximum brightness of two gray scale images

I am using the answer of bill s in Greater operator should give greater element. Here he showed the example: ...
42 views

### More efficient way of filling in a specific entry in a list of lists [duplicate]

"coords" is a list of coordinates in the 2D plane ordered in a specific way, with the 3rd (z-axis) positions left empty to be filled in with specific values, like temperature or concentration at the ...
117 views

### How to Find out the Recurring Period by Pattern Matching?

Note: It's not hard to solve this problem AT ALL, so please, try to explain how to use PATTERN MATCHING instead of how to find out the recurring period. We can easily extract real digits from a ...
57 views

### Random Matrix with criteria

I want to construct $k$ lists $M$ of positions $(i,j)$ for a matrix $X$ of size $n\times m$, where all entries are "painted" with "white" color. The distribution of such a list $M$ must obey the ...
70 views

### How to Replace Plot Slot Numbers With Variable Names

The format of my data looks like: ...
41 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 ...
67 views

### How to do abstract matrix operation?

In this simple example, I have 2 lists, each of which contains 3 matrices。 $J$ here is also a matrix with the same dimension. What I want is $aJc+bJ(b+c)$, but if I use dot product, the result is as ...
58 views

### How to transform the $y$ values in a list of $(x,y)$ pairs [duplicate]

How can I transform data = {{1, 0}, {0, 1}, {1, 1}} to {{1, f[0]}, {0, f[1]}, {1, f[1]}} This is similar to ...
31 views

### How to pair elements of a nestlist? [duplicate]

I have a this list for example expdata={{49, 50, 51, 52, 53, 54},{0,3,5,2,0,1}} and I want to rearrange it like this ...
33 views

### Converting a list of lists of indices into a sparse matrix of ones and zeros

I have data formatted like {{a,b},{c,d},{e,f}} where each entry is an integer. I need to turn this in to a sparse array with entries ...
91 views

### Python Convolve2D functionality in Mathematica

I am new to mathematica. I am looking for an alternative for scipy.signal.convolve2d. I did find functions like ListConvolve, ...
59 views

### How can I get the differences of all elements of list? [duplicate]

I want to get the difference of all elements of a list for example: $L=\{1,2,3,4,5,6\}$ for any $i$ and $j$ $\in L$ return the differences, for example for the first element $1$ we get the difference ...
60 views

### Henon Map Equation Trekker

I am trying to make an Equation Trekker for the Henon map in the following way: ...
79 views

### Sorting matrices by their norms

I have a matrices A and their Norms(Matrices B). I want to rank Matrices A based on their Norms. From smallest to highest Norm
98 views

### Query or MapAt ragged associations or ignoring Missing values

Related to this question, can functions be mapped to named Keys in ragged lists of Associations? ...
333 views

### Cross product between two lists of vectors

I'm trying to create a function that does the cross product between two lists of the same dimensions, element by element. Each entry of the list is a 3D vector. Something like this: ...
27 views

### Make a .C3D file in Mathematica

I have two different groups of points in an excel file, which are captured by two different cameras from two different angles (Motion Capture Process). These points are extracted by using markers on a ...
39 views

### Removing 1 from FactorInteger

I am trying to remove the factor of 1 out of FactorInteger, so that I can search though numbers with common factors easier. Here is what I have already: For[n = 0, n < 10, n++; b = FactorInteger[...
44 views

### Remove columns basing on binary sequence

Possibly it is duplicate, still I could not find here elegant way to remove matrix columns basing on binary sequence. i.e. if I apply {1,1,0,0,1,0,1} to matrix it should delete columns 3,4 and 6.
101 views

### How to generate a Markov Matrix efficiently

A Markov Matrix is a square matrix,which have two features: All elements great than or equal to $0$(But I hope all element great than or equal to $0.1$) All the columns add up to $1$ I have a ...
63 views

### Dividing a list into more, smaller, lists [closed]

If I have the list {3,5,4,2}, is there a way to divide this list into smaller lists of the form {3},{5},{4},{2}?
52 views

### Nested lists replacing of elements [closed]

I have a list of the form SpecialCycle12={{{1, 2, 0, 0, 0, 0, 0}}, {{3, 2, 1, 0, 0, 0, 0}}}` And the list ...
46 views

### Can you unpack a list of values into variables in a With expression?

For instance, if I am trying to draw a graph with 5 vertices labeled a through e, and I want to draw edges connecting a and b, a and c, a and d, a and e, b and c, b and d, and c and e, I would run the ...
165 views

### Replacing elements in lists of a nested list

I have the following nested list ...
51 views

### How to take a list and build sets of 2 elements without duplicates?

I am new to Mathematica so the answer to this question is probably easy. I have a list of 2D-points in the form {{x1, y1}, {x2, y2}, ...} Then I have a function that will take two points and test ...
175 views

### Efficient way to compute a complement while respecting multiplicities [duplicate]

Suppose I have list2 which is a subset of list1. I want to get a res by deleting an element ...
64 views

I would like to pad a nested list like M = {{{a, b}, {c, d}}, {{e, f}, {g, h}}} with some constant "vector", e.g. {0, 0}. ...
84 views

### Double Sorting a Matrix

Say I have two matrices {{0, 1, 2, 2}, {2, 1, 0, 2}} and {{2, 1, 0, 2}, {2, 1, 2, 0}} I then sort by the first row ...
100 views

I cannot find the original post now, but I'm quite sure that there's an amazing post teaching us how to do Thread on ragged lists. but my problem is how to inverse ...
601 views

### Mysterious behaviour of Pick

As everyone knows, Pick can do amazing things, The most fascinating phenomenon is that it can pick though all sorts of lists: The basic & pattern matching: <...
69 views

### Creating a Dynamic Time Index Slider for List Animate Plot

I am trying to create an animation using ListPlot, which has worked, but I want to be able to see how time is changing (i.e. its dynamic value) as the animation runs. Here is my normal List Plot ...
84 views

### How to define the following matrix

How to define the following matrix in Mathematica? A(n) = \begin{pmatrix} B_{1} & B_{2} & \cdots & B_{n} & 1 \\ B_{n} & B_{1} & \cdots & B_{n-1} &1 \\ \...
53 views

### Color a list of 2D points continuously

I have a list of 3-tuples. First 2 positions are coordinates in $R^2$, the third specifies concentration of a chemical at that point, which I want to render in color. Here's what the list looks like: ...
109 views

### Strange Manipulate behavior

Running the following code and pressing the play button under b will input -2147483648 in b. ...
82 views

### Interpolating initial conditions of orbits

I have a data file containing the $(x,y,p_x,p_y)$ initial conditions of two-dimensional orbits. Let's plot them on the $(x,y)$ plane. ...
74 views

### Predicting the initial conditions of orbits inside a closed curve

I have a data file containing the four orbital element $(x,y,p_x,p_y)$ of a two-dimensional closed loop orbit. Note that the exact implicit equation of the orbit is not known. The plot of the 2D ...
53 views

### Passing each element of a list as an argument to a single parameter function [closed]

Consider a single parameter function: g[w_] := w^2 +1; Consider a list: slist= Range[0, 100, 1]; Now when I apply function ...
216 views

### How to select elements from a list of pairs based on 2nd element of the pair [closed]

I have a large list of arrays of the following form ...
70 views

### Using select in a nested list [closed]

I have a nested list of the following form ...
137 views

...