Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

1
vote
2answers
18 views

Subtracting off background data from my data sets

I don't know how to subtract off background data Data0 from my data sets collected in Datagen. ...
1
vote
1answer
24 views

ListLinePlot of a 3D function, over one of the arguments, with a range of values for the other 2 arguments

I have a function of 3 arguments mu[kx_, ky_, lambda_] := -(kx^2 + ky^2) - (kx^2*(kx^2 + 5*ky^2)*lambda)/(kx^2 + ky^2)^4 I want to plot ...
1
vote
2answers
47 views

Efficient way to detect peak value changes in a list

ListPlot[list, Joined -> True, PlotRange -> Full] I would like a simple method to get the positions within the list where the values deviate a lot from ...
1
vote
1answer
33 views

Optimisation of a loop

I've opened a question here, which was answered. The code works totally fine for a small set of data. However, for a large set and over many iterations, it will take a long time (in order of 24 hours)....
0
votes
1answer
36 views

How to correct not precise values

I have the source file file = "test.txt" with these values: ...
1
vote
1answer
35 views

Iterative loop for a given list

Suppose I have the following list: ...
0
votes
0answers
65 views

Efficient way to make updates in a big List

I would like to know is there is a way to do this: ...
0
votes
1answer
50 views

Summing coefficients of multinomial

I have data of following form. data = {{1, multi1(z1, z2,..)},{2, multi2(z1, z2,..)},...} I want to add up all the coefficients of corresponding multinomial (and also want to perform different ...
1
vote
2answers
62 views

Issue with the use of Position

Reading the documentation of Position, I found there's a possible issue: Position looks for matches based on patterns, which may ...
0
votes
1answer
23 views

Problem using Position when using a variable [on hold]

So, I tried to use Position to get the Position of the 90% Maximum of a Photodiode Signal. The code works when i directly use the solution of the .9*Max[...] solution, but I want to have it with a ...
7
votes
4answers
221 views

Deleting list elements by comparing to another list

I have two lists as follow. The first is p={{"j","d","x"},{"d","k","z"}} and the second one is: ...
7
votes
3answers
210 views

Outer with non-diagonal elements

Is there a way to perform Outer operation without evaluating diagonal elements like: Outer[f, {1, 2, 3}, {1, 2, 3}], expecting ...
5
votes
2answers
84 views

Perfomance in Position

I need to find the position of elements in list that are present in close. These are both 2D lists. The code is simple but not ...
8
votes
3answers
91 views

Find positions of certain value in a big boolean list

I would like to know is it possible to find positions of False in t: ...
4
votes
3answers
171 views

Deleting specific elements in a list when they come together

Suppose I have the following list l={{"x","b","c"},{"y","a","d"},{"x","b","y"},{"x","y","c"}} I want to go through the list l and delete elements whenever ...
1
vote
1answer
30 views

Deleting list points that are in a certain 3D region

Hello I have a large number of data points, from which I want to remove these(between the red lines) that seem to fall onto one plane, what would be the best and easiest approach. Also added the ...
6
votes
2answers
87 views

Manipulate -> Pause Play at specific conditions

How can I pause play in Manipulate when a condition is met ? Here is an example: ...
5
votes
4answers
154 views

Constructing higher order transition probability matrix

Recently I asked a question here about how to construct a transition probability matrix given the following list: ...
1
vote
1answer
35 views

Import image files in the order of the file name number [duplicate]

I would like to import images which are frames from a video, they are numbered, so importing them in the correct order should not be a problem... However, when I import them, by writing: ...
2
votes
1answer
25 views

Replace noisy input in list

If I have a list like that: list = {1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1} how can I filter it in such a way that noisy input (like the 2, here) is replaced by the ...
3
votes
3answers
128 views

How eliminate { } in an arbitrary order in subgroup of a nested matrix

How can reach the second matrix from the first nested one: ...
2
votes
1answer
38 views

Flatten a list at some level

I wonder if is possible flatten a list at the last level without flattening at the first level, I think that isn't a good explanation so here is my code ...
4
votes
3answers
167 views
0
votes
0answers
44 views

evaluation of a probability

Hy my program i running only for one value but i want to run this for several values By addind result of previous one at a same time.... my program is ...
2
votes
1answer
88 views

Flattening large list of lists

Part of my code takes in list of lists of around 200 integers and produce a new list of lists. Following the approach in this post and this post, I created the new list using the linked list approach ...
1
vote
3answers
58 views

Evaluating a function that takes numerical arguments over a given list/table

I have a given list of some numbers e.g. a = {0, 0.233, 0.65, 1.56}; I want to evaluate a function ...
1
vote
2answers
38 views

Changing the style in a list

I have the following list, l={{"a", "b"}, {"c", "d"}} I was wondering how can I convert it into: output: {"ab", "cd"}
0
votes
1answer
64 views

Generating list of labeled string [closed]

I want to generate a table that gives the following output: output: {"x1", "x2", "x3", "x4", "x5"} I have tried: ...
1
vote
1answer
20 views

Defining dynamic limit for a list plot

Helly everybody, I will try to keep this as simple as possible. I have a function which looks like this: Min[T_, E_, D_] := Module[ ..... List = {...} ]; In ...
3
votes
1answer
37 views

Generate multivariate monomials with constraints

I'm trying to generate multivariate monomials in variables $p_1, \ldots, p_n$. Each monomial has either $p_i$ as a factor, otherwise $(1-p_i)$. I need to generate all monomials which have exactly $k$ ...
4
votes
0answers
49 views

Join on QuantityArray

I need to merge two QuantityArray objects of mixed type. My first attempt looks something like: ...
0
votes
0answers
28 views

Identical expressions subtracted from each other giving small but significant errors

In my current code, I have formed a list of numbers with two different methods. For the first method, I wrote ...
2
votes
1answer
59 views

labeling data in a list

I have the following list: l={{1,2},{3,4},{5,6}} I want to list plot above such that the first element {1,2} can be labeled "a", {3,4} labeled "b" and {5,6} to ...
2
votes
1answer
58 views

How to speed up `ReplaceRepeated` `//.`?

I have to replace all the elements smaller than 0 in a large matrix to 0.But i found the speed is really slow when the matrix is big. Here is my code. ...
2
votes
1answer
54 views

How do I copy a mathematica column to paste in excel?

I have a list of elements that I transform into a column: a = {1, 2, 3, 4, 5} Column[a] 1 2 3 4 5 How do I print this column so it can be copy-pasted in ...
3
votes
1answer
73 views

Filtering of IsotopeData results for EnergyDecay option

When I use IsotopeData["Tellurium110", "DecayEnergies"] IsotopeData["Tellurium110", "DecayModes"] I'll have ...
14
votes
8answers
2k views

Find longest sequence of zeros in list

How it is possible to find the length of the longest sequence of zeros in list {1,0,0,1,1,0,0,0,0,1,0,0,0,1,1,0,0,1} which is equal to 4 in the sample list above
4
votes
1answer
103 views

Find repeating pattern in 2D list

How it is possible to find repeating pattern and it horizontal shift in 2D list? The example list with repeating pattern could be generated using the following code: ...
1
vote
1answer
32 views

Removing Missing[“NotAvailable”] data in a list [duplicate]

I created a list using IsotopeData command. There are some elements in the list which are Missing["NotAvailable"]. I want to ...
8
votes
1answer
108 views

Is there any simple way to apply or map a function F to each 2 elements of a list but without Partition? [duplicate]

I know that F /@ {a,b,c,d,e,f} produces {F[a],F[b],F[c],F[d],F[e],F[f]} It can also be rewritten as ...
3
votes
2answers
141 views

Deleting unwanted spaces in a list of string

I have a badly structured data and I need to clean it up, suppose I have the following list: l={{"a","b","c"},{"e"," f","g"},{" a"," b"}} As you can see they ...
7
votes
3answers
314 views

Gathering a List efficiently

In my situation, I have a large list of objects L={A,B,C,D,E,...} and a function Q[] applying to them, which will produce the ...
6
votes
3answers
198 views

Generate a random pattern with at-most n repeated consecutive elements

I want to generate a random pattern which has at-most n (>= 0) repeated consecutive elements from a sample space. The following example explains what I mean: ...
2
votes
1answer
21 views

Deleting elements of a list based on specific character

Suppose I have the following list : l={{a, b, d}, {a, v}, {b, c, d}} I want to delete those elements that contain the letter a such that I get: ...
4
votes
2answers
111 views

Select the cases by comparing the second elements of the list

Suppose I have a list: l={{1,4},{2,4},{3,5},{4,6},{5,3},{6,2}} How can I select the elements of the list in the second element is decreasing and first element of ...
1
vote
1answer
42 views

ListPlot as a function of a variable

I was writing the following code. Now I am a bit stuck with a problem. Can anyone help? My code lies below: ...
1
vote
1answer
88 views

How to generate a training set in an automatic way?

This question is related to my previous item where arithmetic with machine learning was considered. The results of the Predict command were not good because of a ...
-1
votes
1answer
48 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_{...
0
votes
2answers
59 views

Reproduce orthogonal images from 2d consecutive image set

I have 3474 images (png, 8bit, gey scale, horizontal size x=3107 pixels, vertical size y=1200 pixels). The images can be downloaded here: https://drive.google.com/open?id=1rK7xlbFIGMG4O3Z-...