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

learn more… | top users | synonyms (3)

2
votes
2answers
151 views

Generating an editable table that can be used as input

Say I have a number $n_{max}$. I want a command to generate a table like 1 1 2 2 3 3 4 4 ... nmax nmax where the second column is editable, and this table can be ...
2
votes
5answers
195 views

How do I find the maximum value from the given set of data?

I have a set of data like {{x1, y1},{x2, y2}, ...,{xn, yn}}. From this data can I find the value of x for which ...
2
votes
1answer
138 views

How to make an efficient difference of sets function?

How to write a nice code that removes all elements from given set A, that occur also in set B? I would like to use DeleteCases[] for this purpose, but have no good ...
2
votes
2answers
205 views

Deleting parts of groups that do not have equal dates

Find the intersection of dates within the pair and remove the other dates & corresponding prices. Also keep the list in same format as it currently is in. Let me explain: Each stock has closing ...
2
votes
1answer
200 views

How to compute a discrete histogram of a list [duplicate]

I'm trying to compute the discrete histogram of a set of values. By histogram I mean the absolute frequency a value appears on the dataset, by discrete I mean the values are from a discrete set, e.g. ...
2
votes
2answers
181 views

Replacing all values in a table > $T$ [duplicate]

I want to generate a table of Euclidean distances from the points in a list to a given point, e.g.: ...
2
votes
1answer
194 views

Equating two lists, element by element

Say you have two lists: listA = {a, b, c} listB = {d, e, f} How would you produce a listC that equates each of the two's ...
2
votes
3answers
285 views

Introduction of straight Line into Manipulate function

I just want to implement a line within my chart that starts from time point 0 to time point T and whose y-coordinates can be manipulated, which in my case is represented by D. I tried to implement a ...
2
votes
2answers
341 views

Preparing data for making an ErrorListPlot

I often have the following notebook in Mathematica, which I use to make a dataset and associated errors: ...
2
votes
3answers
359 views

Maximum tuple value

Is there a simple way to make a maximum tuple value (similar to python)? For example, in python max([ (1,2), (1,3), (3,1), (4,0) ]) returns ...
2
votes
1answer
278 views

Table with dependent iterator

I'm trying to build a table where the iterator is based off of the ith-1 entry in the table. In other words, the value at i is based on a function with i-1 as its input. EXAMPLE: Let's assume we're ...
2
votes
3answers
630 views

Problem with Union and Intersection

Consider the following: list={{a,b,c},{c,d,e},{d,e,f},...{x_,y_,z_}}; I would like to apply Union on the elements of the list ...
1
vote
2answers
37 views

Subpartitioning elements of a list based on some h[ri] == h[rj] test

If we have a list of elements: list = {r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12}; I'd like to further partition the elements into sets where, for some ...
1
vote
2answers
71 views

Insert at specific resulting positions?

I have an initial list: list0 = {1,2,3,4,5}; and I want to insert {a,x} at specific positions ...
1
vote
3answers
136 views

How to ReplaceAll independent of depth?

I have a big list which in principle can be described as this more compact list : ...
1
vote
3answers
437 views

How to expand the size of the matrix automatically?

I have a matrix in 2x2 a ={{x, y}, {z, u}} I want to expand this matrix 3x3 b ={{x, y, y}, {z, u, x}, {z, x, u}} 4x4 ...
1
vote
2answers
184 views

Sorting lists element by element [duplicate]

I have a problem regarding list sorting. Let's say I have a list of lists obtained using Subsets[], of the form ...
1
vote
3answers
199 views

Generating a list of cubefree numbers

I am trying to generate a list of cubefree numbers (i.e. numbers when prime factorized contain no tripled factors) within a given range. Of DivisorSigma, ...
1
vote
4answers
209 views

Add Brackets to a string list

Hello stackexchange community! I have a stringlist with a value and his error for eg: {{"12","1"},{"13","2"}} Now i want to output this as something like this ...
1
vote
1answer
129 views

Replacement variable in list plot

I would like the replacement: /. {ComplexInfinity -> 0} to be treated as a variable. I am trying to overlay the following list plots: ...
1
vote
1answer
200 views

Split Lingustic(IPA) at Words Unique Sounds

How might I split a word at each IPA of each unique sound. For example {"pray", "wade"} (* {{"p","r","ˈeɪ"}, {"w","ˈeɪ","d"}} *) ssch answered a question here ...
1
vote
1answer
127 views

Extracting lists from list based on length

I have a list looking like this; ...
1
vote
1answer
167 views

Averaging multiple 2D data sets

I have multiple data sets, each of which is a 2D matrix. I want to construct a new 2D Matrix in which each element is the average of that element for all the original data sets. i.e ...
1
vote
1answer
163 views

Extracting values

I have imported a data from an excel sheet. I want to extract parts of the list based on some conditions. First I want to create one list whit the The Coca-Cola ...
1
vote
0answers
146 views

Why doesn't ParallelMap improve the performance of FoldList?

This question arose during my analysis of the following problem: filling gaps. (The code used here is Simon Woods's work.) FoldList seems to not cooperate with ...
1
vote
2answers
216 views

What ways are there to convert an Integer to a list of digits?

How can I convert an Integer to list of numbers? For example: 781049 ==> {7, 8, 1, 0, 4, 9} What are the possible ways of ...
1
vote
2answers
646 views

How do I divide the columns of a matrix by the sum of its elements?

I am trying to create a transition matrix for a network. In order to do this, I need to sum down the column (the out degree), and then divide the column by the out degree in order to normalize it. ...
1
vote
4answers
394 views

Combining two lists [duplicate]

Possible Duplicate: How do I obtain an intersection of two or more list of lists conditioned on the first element of each sub-list? I would like to combine two lists. ...
1
vote
4answers
199 views

Order of operations for the Table function [duplicate]

Possible Duplicate: Using pure functions in Table I have run into a situation that I do not understand when trying to generate a nested list of pure functions. I have the following code. ...
1
vote
2answers
132 views

Return a string from a vector containing a string and a number

I currently have a List of the form, {{String_1, 8.}, {String_2, `101.}, {String_3, 37.}, ..., {String_n, 28.}} Along with another list, ...
1
vote
2answers
277 views

Combining lists with common elements efficiently [duplicate]

Possible Duplicate: Computing the equivalence classes of the symmetric transitive closure of a relation I am required to process sets consisting of 2-element subsets of integers by ...
1
vote
3answers
279 views

Replace values of a list containing words and numbers

I'm trying to import some data in a .txt file which contains numbers and words. I import a list which consists of four rows of measured data acquired with an oscilloscope, but the acquisition program ...
1
vote
2answers
239 views

Symbolically associate vectors and their norms

I am wondering how to handle the following situation: I do have vectors of known dimension that I would like to handle symbolically. I suppose I can do something like ...
0
votes
3answers
68 views

Splitting a list of lists

What would be a nice way to split the list list = {1,2,3,{a,b,c},4} into {{1,2,3,a,4},{1,2,3,b,4},{1,2,3,c,4}}
0
votes
0answers
32 views

Grabbing columns from a matrix [duplicate]

If I have a matrix - exampleMatrix = {{A1,B1,C1},{A2,B2,C2},{A3,B3,C3}}; And I want to create a matrix like - ...
0
votes
1answer
113 views

ListDensityPlot with discrete bins [duplicate]

We consider a table of the form data = Flatten[Table[{i,j,f[i,j]},{i,1,ni},{j,1,nj}],1] The function f[i_,j_] has been made ...
0
votes
2answers
124 views

How to partition three years of data into daily samples

I'm trying to find mean of temperature data list. The temperature data list has 3 hours steps which means I have 365*8=2920 temperature measurements per year. My data are temperatures of 13 years. ...
0
votes
1answer
166 views

how to store output of a function in a table for future use [closed]

I am new to Mathematica and if this is a simple query - please excuse me for the same. I am trying to solve a equation which is a function of two variables. From the solution, I need to store the ...
0
votes
1answer
141 views

Using DeleteCases with multiple AstronomicalData properties

I am attempting to use AstronomicalData and DeleteCases together to remove invalid cases of two properties while listing the ...
0
votes
2answers
139 views

Associate the elements of a table

I have a table form as: table = {{a, 6}, {b, ff}, {c, 2}} I want to associate the first element of each pair from the table to the second element of the pair as ...
0
votes
2answers
74 views

How can I make my output to be added to an existing list?

v = {{0, 0, 0}, {1, 0, 0}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}} For[i = 1, i < 6, i++, For[e = 1, e < 6, e++ 1, Print[Mod[v[[i]] + v[[e]], 2]] ]] I ...
0
votes
2answers
163 views

Combining graphics & lists / tables

I have: created with: ...
0
votes
1answer
200 views

Passing lists to functions in a manner that works like pass-by-reference in other languages?

Is it possible to use a list as a variable, i.e., to pass it by reference to a function? In particular, I have a two-dimensional array and a function to get one element specified by its position: ...
0
votes
2answers
134 views

Problem with Select and Pick

I want to filter a data file choosing those elements that match a condition and then plot them. Here is the corresponding code I use: ...
0
votes
2answers
339 views

Finding max value of each column of 4x4 Array

I have the following array in both MatrixForm and List form ...
0
votes
1answer
137 views

Stopping- threshold and stopping- time of stochastic processes.

Rod Lm helped me to generate the following code, which I want to extend a little bit. So my intention is to use the threshold (the green line) as boundary in the following way: as soon as the process ...
0
votes
2answers
245 views

Recursion on a moving window

I need to apply some computations to a moving window of $N$ items in a time series and I am struggling with doing recursion and shifting the considered window. To illustrate, please consider the ...
-1
votes
2answers
97 views

Manipulate store values

Is there a way to store the numerical values from a manipulate function in the form of a table? For example, if the function is f[x_] := x^2 - 2x Can one store ...