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

learn more… | top users | synonyms (4)

5
votes
6answers
336 views

Selective thinning of string elements in nested lists

I have a nested list similar to this example list (but much bigger and more messy): ...
0
votes
1answer
1k views

How to calculate the area of a listplot [duplicate]

I need to calculate the area enclosed in a two-dimensional listplot and following an answer to a similar question I tried this way: ...
2
votes
1answer
516 views

How do I sort complex numbers?

Okay, so I posted something about sorting, and it was linked as a duplicate to This post However, I am having problems trying to sort a list that contains both real and complex numbers. I put them ...
1
vote
3answers
148 views

How to convert a spaceless data into tab delimited

I have a data set in form of:(this is just an example) 1324501020 3241030205 4332020134 the data are stored in a text file (e.g. data.txt) but I need to convert ...
8
votes
3answers
324 views

Numbering nested list according with Depth (or Level)

(This question is slightly similar with Sequentially numbering a nested list, but not exactly the same.) What I want Say I have a nested list ...
1
vote
2answers
172 views

Indicating the probability that a weather datum is above/below some given value on a geographic map

With help of the previous questions here, I am analyzing weather data as daily MeanWindSpeed of some cities with the following code: ...
1
vote
1answer
107 views
2
votes
2answers
362 views

Create list via checkboxes

I am trying to achieve the following: Three (dynamically updated) Checkboxes (a, b and c) can be toggled on or off individually. Depending on their status, a ...
1
vote
1answer
131 views

Format Preservation of FullSimplify on Indexed System of Autonomous Equations

I currently have a large system autonomous differential equations. I've indexed a more managable dummy system of identical form, using Part to reference each ...
14
votes
1answer
181 views

Why changing list's head takes time?

Consider AbsoluteTiming[Range[10^7];][[1]] 0.035000 and AbsoluteTiming[HoldComplete @@ Range[10^7];][[1]] ...
4
votes
1answer
70 views

Optimizing List Multiplications

I've got a list manipulation optimization problem. Consider a two-dimensional nxm list list1, and a three-dimensional nxmxm list, ...
1
vote
0answers
62 views

Sorting Eigensystems [duplicate]

SO I have this code: ...
3
votes
3answers
215 views

Plot sublists as different colors

I have one big list with many sublists inside. All sublists consist of three numbers. For example: ...
3
votes
0answers
210 views

Exporting Specific Cells of Many Workbooks into One using Mathematica

I currently have a large number of detailed files from which I would like to extract certain cells' information to make an Archive spreadsheet. There are approximately 9 parameters of each ...
3
votes
1answer
140 views
3
votes
1answer
134 views

Filtering the elements of an array to split them into two categories

So, I am new to Mathematica, and I am trying to write something that involves taking values from one array and separating them into two different arrays. My code for doing this is: ...
1
vote
2answers
177 views

Counting a cardinality of a subset satisfying special property

Suppose that we have a set of 9 2-dimensional vectors $c$ by m=3; n=2; c=Tuples[Range[m],n]; We want to define a subset $S$ of vectors in $c$ by the following: ...
3
votes
2answers
1k views

Function returning Null along with other unexpected expressions

When I use some function, at the end along with the output I get some NULLs returned that I don't understand the reason for and are highly undesirable. For example, when I define the reversal of list ...
3
votes
1answer
235 views

Generating a list of all factorizations

What is the best way to generate a list of all factorizations of some number $n$? I'm quite new to Mathematica so this might be obvious. I have been trying some basic stuff with ...
3
votes
1answer
217 views

Indexing of Large Autonomous System of Equations for Use in NDSolve

I currently have a list of ~150 autonomous ODE's that I need to be able to work with using NDSolve. Fortunately I already have them formatted in plaintext, which ...
5
votes
3answers
233 views

Applying a function with the HoldAll attribute inside NestList

I'm trying to write an update function, which can be applied to a list and then to NestList it. As the function has to manipulate the given variable I figured I ...
2
votes
4answers
2k views

How can I create a list of functions?

Can anyone tell me, how to create a list of functions? I've tried the following code, but it doesn't work. ...
2
votes
1answer
123 views

Flat function with repeated sequence

There are functions like Join[ ] that accept a variable number of arguments. Join is a flat function, as the order of arguments ...
10
votes
1answer
277 views

Efficient way to solve equal sums $x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k$ with Mathematica?

I need to solve the system of equations, call it $S_1$, in the integers $$x_1x_2x_3x_4x_5 = y_1y_2y_3y_4y_5$$ $$x_1^k+x_2^k+\dots+x_5^k=y_1^k+y_2^k+\dots+y_5^k,\;\; k= 2,4,6$$ I used a very ...
5
votes
4answers
255 views

Tricky selection of elements based on their position

I need to make a list of some elements from a 4D array with dimensions 4x4x4x4. I need to select the elements based on their position in the following way: name an element e(x,y,z,w); I need all the ...
2
votes
2answers
125 views

Can you form a list with elements which are terms from an equation?

Is there a command that takes an equation as an input and creates an output with a list of terms in the original equation? Something like: ...
0
votes
0answers
40 views

Generating partitions of a set with a specified size of the parts [duplicate]

I tried the following (inspired by the answer here) myList = {a, b, c}; Needs["Combinatorica`"]; SetPartitions[myList] and I got this answer, ...
2
votes
2answers
203 views

How to select elements from a 4D Array?

I am very new to Mathematica (first time!) and I'm already having troubles with arrays. I basically have a 4D tensor, that is a matrix (call it M) which has for ...
0
votes
1answer
137 views

Monitor the list for changes

I wrote a function to monitor the list of variable. What it does is if the variable in list change, the changed variable will be separated from others. check the function and output ...
1
vote
1answer
330 views

How do I operate on a set of ordered pairs? [closed]

I have a calculation that will give me a lot of ordered pairs. For each such pair in a list, I want to square the elements and add them together. Here is an example of the kind of list I have ...
3
votes
2answers
217 views

How to replace Do loops by Inner

I need to replace Do loops by something else because it takes forever with big programs. I have been hinted towards Inner, but ...
7
votes
3answers
342 views

Making large tables easy to read with frozen headings and scrollbars [duplicate]

I would like to represent a table containing a large amount of information in such a way that I can (a) use scrollbars and (b) have table headings that don't scroll off the screen [just like the Free ...
6
votes
1answer
121 views

How does `LongestCommonSubsequence` work?

When I recently came across this posting about LongestCommonSubsequence I was curious about how the function worked. ...
4
votes
2answers
567 views

Linear regression in a chosen range of points

Hi I'm absolutely newbie in Mathematica and have following problem: My list looks like {{50, 0.75}, {51, 0.76}, ..., and I want to choose a range out of my ...
0
votes
2answers
716 views

Finding max, min, and closest root of two dimensional data

I have some data that is two dimensional (traditional (x, y) format) as so: var = {{x1, y1}, {x2, y2}, {x3, y3}} I would like to search through that large list ...
11
votes
6answers
1k views

Multiplying two dimensional data by a constant

I have a list of lists of the form: {{1, 2}, {2, 4}, {2, 8}} But I want to multiply only the second dimension of that data by a constant. I know I could do this ...
1
vote
2answers
223 views

Plotting array of vectors with conditions

Given data in the form list={{{1,2},{3,4},{5,6}},{{7,8},{9,10},{11,12}},...} a matrix where elements are 2-element vectors, what is a efficient way to plot this ...
0
votes
1answer
131 views

joining lists based on content

I have lists created by other processing steps, which are basically constituted by elements like this: ...
3
votes
3answers
190 views

Picking certain pairs according to a condition [duplicate]

I'm a Mathematica beginner and can't find out a solution to my problem. I have a list of pairs of numbers, for example something like this, but much longer: list={{2., 3.}, {3., 2.}, {5., 4.}, {4., ...
2
votes
1answer
139 views

Expand List Operation

On applying a multiplication and subtraction on a list, like so: x = 2y - 4; Where y is a list containing fractions of complex numbers generated from dynamic ...
5
votes
1answer
156 views

question about Inner [duplicate]

question1: (code 1 something wrong, Why? and how to overcome this to achieve the next code's effect) ...
3
votes
4answers
160 views

Rearranging a set of numbers

I have this set of numbers, that is a range of prices (ie 6-10) and a quantity of products (5) ...
4
votes
1answer
456 views

Create a table with inline conditions

I am trying to create a table with conditionals inline. For example, I'd like to create a 2 dimensional table like this: ...
2
votes
2answers
394 views

How to populate a table using a rule replacement

I am trying to populate the rows and columns of a table by using a rule replacment. To generate a table that looks like this For example Sc would be row 1, column 1. An example of a record looks ...
1
vote
1answer
411 views

How to normalize parts of matrix elements?

To normalize the last 2 or more columns of a matrix, ...
19
votes
5answers
962 views

Instruct a Table to only evaluate until a condition is fulfilled

I am looking for the way of building a Table of pairs of numbers in a fast way. My true table evaluates huge functions, and I see no way and reason to show those cumbersome expressions here. Let us ...
0
votes
1answer
87 views

Breaking up data and finding independence

Suppose I have the list with elements (either 1 or 4 as the last digit) as follows: ...
0
votes
3answers
842 views

Pass an empty list object into a function and dynamically generate its list elements

I have another question on passing a list which needs to be generated dynamically. (Sorry for posting two questions in one day...) I did some search and found a similar post here, but I think it was ...
0
votes
0answers
174 views

How can I solve this system of functional equations?

I would like to use Mathematica to find maps a, b, c, d, e, f such that ...
1
vote
1answer
154 views

Statistical analysis of data-list with recurring x-values

I have a list of data as follows with repeated x-values: ...