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

learn more… | top users | synonyms (5)

3
votes
4answers
123 views

Assign a list of sums to indexed variables

I want to generate a list of sums {a, b, c, d, ..., z} and assign them to a list of variables such that ...
3
votes
1answer
70 views

Import Excel sheet into 3D array, 1st row and column as x- and y-axis

It might be simple, but for me, it took several hours working on, but still cannot figure out. Basically, I'd like to create 3 dimensional list data ({x,y,z}) from excel file, so I can plot them ...
4
votes
2answers
54 views

positions satisfying pattern and grouped

I have a list of numbers and I am looking for a way to most efficiently find positions of values that satisfy a certain condition and group those positions that are sequential. To illustrate, a simple ...
2
votes
3answers
83 views

How to get a C4-symmetric (coincides after 90° rotation) matrix via `ImageData` from `Graphics`?

I tried an easy example with Disk centered at {0,0} with radius 1. Obviously, that object is C4-symmetric. Further, ...
4
votes
1answer
129 views

Insert a symbol include first and last position [closed]

Assume we have a list list = {"a", "b", "c", "d", "e", "f"} Then use this code: StringRiffle[list,"*"] But ...
4
votes
1answer
75 views

Joining table of tuples with table of scalar values [closed]

I have a table of dimension $M \times N \times Q$ of 3-tuples {x,y,z} that represent points, and another table of dimension $M \times N \times Q$ of scalar values. ...
0
votes
0answers
24 views

Finding the percent difference between elements of a matrix and a list/vector [duplicate]

I have a large matrix of 24 columns, 11 rows, and a vector in the form of a one column, 11 row table. What would be the best method of finding the percent difference between each element of the matrix ...
3
votes
1answer
63 views

overlap of data

I have two individual Date lists as Date Objects: List 1 = {1 Jan 1991 9 :00 , 3 Jan 1991 11:00 ..etc } List 2 ={ 7 Jan 1991 14:00, 9 Jan 1991 15:00 ..etc} For ...
4
votes
2answers
121 views

Arc length parameterization of a list of points?

Suppose I have a curve represented by a list of points in the form $\{\{x_0, y_0\}, \{x_1, y_1\}, ...\}$. How to generate a list of numbers $\{s_0, s_1, ...\}$ where $s_i$ is the distance of ith point ...
0
votes
1answer
82 views

Breaking data sets into series for plotting

I have a generated a data set of a function $\alpha(\lambda_2,\varepsilon):\mathbb{R}_+ \times (0,1) \mapsto (0,1)$. I used mathematica to generate a list by varying $\lambda_2$ and $\varepsilon$; $\...
1
vote
4answers
151 views

Non-rectangular pick of elements of a matrix

How to pick elements of a matrix that are inside a circle centered at the center of the matrix?
1
vote
2answers
93 views

How to make some mess points to be more smooth?

Background: The question is derive form this post.I have a another thinking about it.Some points in a suface you can give a certain equation but some points you cannot.So I wanna get a method to ...
3
votes
2answers
101 views

How to gather a list whitout no repeat element to nearest a certain number

Background: The question derive from this question.But some criteria is omited by me.So I try to post a new question for this.If my expression is dimness and you have got it,just tell me or edit my ...
5
votes
2answers
150 views

Multiply list of matrices by list of vectors

I have a list of vectors and a list of matrices for each vector, what i need is to multiply each list of matrices to respective vector. ...
4
votes
1answer
68 views

Creating a tensor from matrices

I have 3 nxn matrices that I'd like to combine into a nxnx3 tensor. Basically, I want a new nxn matrix where each element is a 3 tuple of the elements of the other 3 matrices at that same position. ...
0
votes
2answers
81 views
1
vote
1answer
69 views

How to sort a list by another list?

I have a list and a order ...
4
votes
3answers
163 views

Remove 2D points where nearest neighbor exceeds certain distance

I have the following 2D points: ...
3
votes
3answers
132 views

Selecting all the elements of different length that contain only numbers

If I have a list of lists with different lengths: {{1, 2, 3}, {1}, {1, 2, 3, 4}, {x}, {1, x}, {2}, {2, 3}} How can I extract all the sub-lists with no symbols: <...
0
votes
0answers
93 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 ...
1
vote
1answer
44 views

list missing numbers [closed]

Let m=[1,2,3,4,5,6,7,8,9,10]; be a set and let s=[ 2,4,5,6,8,9]; be a subset of m. How do list all missing numbers in s from m. For example, the missing numbers in s from 1-->10 are 1,3,7,10. So, ...
2
votes
3answers
105 views

Select a list in MemberQ

I have bounch of code like: ...
3
votes
2answers
102 views

Find the first n pairs in a list whose difference is the nearest to some number

This is my list: list = {2.6135182051634342, -2.6690957180727297, 0.26060239174734157, -0.4182243295792278}; I wanna gather it every two number,which make ...
1
vote
3answers
90 views

Percent Difference between elements from 2 matrices

If i have a 22 by 25 table of values which depend on n and r, and a list of values that depends on r that is a 22 by 1 matrix, how can I find the percent difference between each element, by row in the ...
1
vote
3answers
67 views

Adding numbers to a list

Say you have the following list of 12 elements X={"x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x", "x"} And I want to turn it into the following sorted ...
0
votes
1answer
22 views

Define nonzero variables Varyx = z_xy from table with dimensions x,y and values z_xy

I'm trying to do the following. I have a table, call it TransTable. To give an example ...
1
vote
1answer
108 views

List Deconvolution

I have some experimental data to analyse. The function $f(t)$ that describes it is however convolved with a gaussian, due to finite resolution of our experiment. $f(t)$ is too complicated to be ...
1
vote
1answer
50 views

How to deal with repeating usage of same attributes

I am producing in my notebookfile many plots with the following example code: ...
3
votes
1answer
47 views

Corresponding list value and index in a list

I have a list and I know the maximum value of that list by using Max[list]. The thing is I want to find out the index number of this list that corresponds to this ...
6
votes
4answers
200 views

Group list elements in sequence

Suppose we have the following list: list1={1,2,4,6,8,9,10,14,15,17,21,22,72,76,80,96,106,116,117} Actually the real list has about 100K elements. What I want to ...
3
votes
3answers
122 views

Assigning to multiple variables in a list the values in another list

I have two lists, one contains the variables and the other the corresponding values that the variables should take. ...
1
vote
3answers
134 views
1
vote
1answer
48 views

Transform {x,y,…} and {a,b,…} in to {x->a,y->b,..} [closed]

How to merge two list and add -> to it. For instance, I have {x,y,z,...} and {a,b,c,...} ...
1
vote
1answer
66 views

Adding +2015 to each value of my x-axis [closed]

I want to change all of the values of my x-axis by +2015 The problem is, I evaluated a large expression using incremental values {i,1,85} and plotted that data. The Plot's x-axis is 1 to 85, as ...
1
vote
1answer
59 views

Generating lists of data with ReplacePart

I have the following example: ...
2
votes
0answers
73 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) ...
3
votes
1answer
153 views

How can I optimize the search between two lists, one that is changing length?

I'm trying to identify unique arrays by comparing two lists, one which is growing in length. The number of elements in the list grows as 2^n^2, where ...
5
votes
3answers
132 views

Lazy form of Tuples/Outer to loop over list of lists

This is less a question and more asking if someone has implemented this already, with more skill. I need to perform the Outer-like generalized outer product of a ...
0
votes
3answers
85 views

Interactive Application using Manipulate for Fibonacci Series

I am working on creating interactive app using Manipulate function on fibonacci series using SeriesCoefficient. I want to plot the fibonacci numbers based on the slider of Manipulate function. I have:...
2
votes
1answer
62 views

Pairing values with their indexes for MapThread

Several operations require you to map over a list of values and to know the index of each value as you process it. To accomplish this, my current somewhat ugly solution uses MapThread: ...
4
votes
1answer
64 views

How to create overlapped block matrices and simplify the result

This is sort of a duplicate of Creating overlapped block matrices, but the question wasn't fully answered since the OP never returned to clarify. I am using Kuba's answer for FEM, but I have been ...
1
vote
1answer
48 views

DOS-like Wildcard for Filtering List of Files [duplicate]

I have a list of file names that I would wild like to filter based on a DOS like wildcard specification similar to what can be used as the first argument,"forms", of ...
1
vote
2answers
62 views

How to use Cases to extract sublists [closed]

I have the following values obtained from a table: ...
4
votes
2answers
302 views

How can I define variables that follow a naming pattern?

Let's say I have this enormous list of a million elements, and I want to access this list piecemeal in non-intersecting sublists of length ten. If ...
0
votes
1answer
105 views

Delete only when there are two (or more) 1s

I would like to remove element from a nested list when they have a certain number of elements repeated. For example: {{1,2,3,4},{1,1,2,3},{1,3,4,1},{1,4,2,4}} I ...
6
votes
1answer
118 views

How to Collect a variable multiplied by a constant?

I'd like to use Collect to get terms that have a variable multiplied by a constant. For example I'd like: Collect[x + b x, b x] ...
1
vote
1answer
63 views

Create large system of inequalities by substituting coefficients from intervals

I have given statements for example: $ax + by < c_1$ $cx + by + dz < c_2$ And I want to create larger system of inequations in such a way (suppose variables $x,y,z$ from intervals): I ...
4
votes
3answers
132 views

Indexing all elements of permutations $S_n$

I have this Table that gives all elements of $S_n$, I would like to know how to improve efficiency. ...
0
votes
0answers
48 views

Selecting items in a list based on multiple conditions Part 2 [duplicate]

This question has been solved. Thanks for all your help! I encounter another problem, which is related to a previous question. Now, I have data for different days, so that my data now looks like ...
0
votes
4answers
103 views

How to use Select according to a list of criteria to produce a list of subsets of another list obeying those criteria [duplicate]

The code Print[Select[{1, 4, 3, 9}, Mod[#, 3] == 0 &]]; Print[Select[{1, 4, 3, 9}, Mod[#, 3] == 1 &]]; Print[Select[{1, 4, 3, 9}, Mod[#, 3] == 2 &]] ...