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

learn more… | top users | synonyms (3)

0
votes
0answers
39 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
178 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
135 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
253 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
209 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
303 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
113 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
374 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
561 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 ...
10
votes
6answers
829 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
199 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
122 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
177 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
117 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
153 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
147 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
321 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
318 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
308 views

How to normalize parts of matrix elements?

To normalize the last 2 or more columns of a matrix, ...
19
votes
5answers
797 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
86 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
530 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
136 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
144 views

Statistical analysis of data-list with recurring x-values

I have a list of data as follows with repeated x-values: ...
3
votes
1answer
247 views

Replace elements in a list

Suppose that I have a list: ...
2
votes
0answers
250 views

Derivatives of list elements

Could someone explain the odd behavior of the Derivative function when drawing arguments from lists? We have, ...
2
votes
2answers
901 views

Importing several huge files with headers & footers

having here several files in ASCII format http://ge.tt/91rv0Jf/v/0 I want to import, while removing headers and footers and then join the several lists. ...
5
votes
4answers
451 views

Any rule of thumb for converting a simple mathematical expression into a pure function?

By simple mathematical expression I mean one with a few functions and few variables copied into MMA in a mechanical way from a math book. For example this one, giving the distance between two points ...
1
vote
1answer
142 views

Splitting list of sums into a sum of lists

I want to split a list of sums into a sum of lists For example, I'd like to turn {{x + y + z}, {x}, {y}, {z}} into ...
5
votes
1answer
250 views

Is there an equivalent of “shiftdim” of MATLAB?

Recently I'm spending my time implementing some computer vision algorithms, which usually handle a large amount of data. The problem I'm facing now is that I have to reform my video data to pass it ...
6
votes
3answers
608 views

Replace “,” in a list with “.”

I have a list which consists of numbers which use comma (,) instead of dot (.) as their decimal point. I would like to replace the commas, but only those commas which are followed by more than five ...
1
vote
1answer
225 views

Partial row reduction of a matrix

I have an $m\times n$ matrix (presumably of full rank) with $m>n$, and I would like to row reduce it, but leave the last column unreduced; that is, I want to get output on the form $\pmatrix{ 1 ...
0
votes
2answers
148 views

Convert *.txt file

I would like to Import and Convert a *.txt file which looks like: https://docs.google.com/file/d/0Bw-308nJcF01Yl92RURCLUg4VzQ/edit?usp=sharing and turn it into a Matrix which I can use to make ...
20
votes
4answers
4k views

Finding Local Minima / Maxima in Noisy Data

I'm trying to find local minima / maxima in noisy data, consisting of data values taken at certain time intervals. Ideally, the function should take a pair of lists (one containing time values and one ...
1
vote
3answers
168 views

How can I create a new tables out of a table and plot it

I have the following problem. I have a table, call it m, which is labelled by 3 indices (say i,j,k), each of them running from 1 up to 100. I would like to be able to construct a new table which would ...
5
votes
1answer
441 views

nested use of Apply/Map/MapThread in pure functions

1. My main question I have a function with two argument slots. I wan't to apply this function to 2 lists with different length's. I thought in this solution: ...
5
votes
5answers
2k views

How to sum over a List

list = {11.5575, 11.397, 5.52734, 4.0878, 2.54815, 1.86652, 2.55028, 2.14952, 1.6242, 1.34117} I have a list of numbers. How do I make a function that creates a ...
1
vote
1answer
128 views

ReplacePart inside For loop

I am trying to replace the last column of the following expression (mat) by doing ...
2
votes
1answer
140 views

Plot several lines with different starting points on the x-axis

First of all, I would like to apologize in advance if I don't use the correct terms or if I express myself unclear but I just started to work with Mathematica. I'm simulating electricity prices and ...
17
votes
7answers
1k views

Find continuous sequences inside a list

I have a list which is something like this: {3,4,5,6,7,10,11,12,15,16,17,19,20,21,22,23,24,42,43,44,45,46} What I'd like to to is get the intervals which are in ...
0
votes
1answer
347 views

Keeping axes fixed in an Animate of a 3D graphic

I am using the following code to animate a 20 3D ListPointPlots: ...
6
votes
2answers
327 views

How can I find if the number of subsets for a list is very large?

I'm trying to find the following; Subsets[Range[2, 2300], {4}] but my computer gave the following error: ...
25
votes
1answer
474 views

How can I make threading more flexible?

Threading automatically with Listable functions requires the argument expressions to have the same length (or for one of them to be atomic). For nested lists the ...
3
votes
3answers
223 views

Logical AND operation over several comparisons

Let x and y be arrays defined as Array[x, m], Array[y,n] respectively. How to generate the following function of $x$ and $y$ for variable $k$: ...
3
votes
1answer
249 views

Including two ListLinePlots in a 3D graphic

I have two lists of data which I am plotting on two ListLinePlots. I would like to have these two plots appear perpendicular to each other on a 3D graphic. I have ...
0
votes
0answers
100 views

How to combine file data chronologically via reading numbers in a filename and put it in one list?

Say I have a bunch of files with nearly same filename, eg. data_timestep1, data_timestep2, ... The data itself in one file is ({x1, y1, z1, absolute field value 1}, {x2, y2, z2, absolute field value ...
-4
votes
4answers
138 views

Extracting the integers from a list

I have a list where the elements are Reals and Integers. How can I extract the Integer? For example, if I have {1, 2, 3.4, 9.9}, how can I get ...
1
vote
3answers
345 views

Summation over 3 lists

I have three lists. As an example, a = {10, 5, 6, 8, 7}; b = {4, 8, 9, 7, 9}; c = {7, 5, 12, 4, 1}; I want to get $$x(i)=\sum ...
0
votes
0answers
29 views

Error in extracting a column [duplicate]

I imported excel data to Mathematica using this command. kuruzD = Import[ "C:\\Users\\TMH\\Documents\\Problem Set 4\\kuruzData.xlsx"][[1]] //TableForm I want to ...
1
vote
3answers
324 views

How to find intersection of multiple lists excluding empty ones?

I have lists like list1={1, 1, 2, 3}; list2={3, 1, 4}; list3={}; I want to find the intersection of all list. I tried the following way, but it's not working. ...