# Tagged Questions

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

1answer
27 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 ...
4answers
112 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. ...
0answers
19 views

### Indexing of Large System of Equations for Use in NDSolve

I currently have a list of ~150 DAE's (differential-algebraic equations) and I need to be able to work with using NDSolve. Fortunately I already have them ...
0answers
69 views

### Extracting points data from a 3D curve surface?

I have a 3D data sets, and I have used it to create a 3D plot, but some of the data points are errors and need to be removed. How I can I remove the bad points from the plot? ...
2answers
81 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 ...
1answer
152 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 ...
4answers
114 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 ...
1answer
59 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 ...
2answers
82 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: ...
0answers
74 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 ...
0answers
33 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, ...
0answers
58 views

### Generate a list without braces? [closed]

Ultimately I want to plot a user-created function for many input parameters. Plot[{P[1,k], P[2,k], P[3,k], P[4,k], P[5,k]}, {k, 0, 500}] but I need to generalize ...
2answers
91 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 ...
0answers
51 views

### Problems with ListDensityPlot

I have the errors in one quantity $x$ in a List form as $(\Delta x,z)$, being $\Delta x$ the error and $z$ the value in which $x$ has the respective error. I want to make a density plot of the errors ...
7answers
3k views

### Mathematica: finding min/max in list

I have a list of coordinates like this one: {{x1,y1},{x2,y2},{x3,y3},...,{xn,yn}} I need to get the minimum and the maximum of all x-values and the minimum and ...
1answer
66 views

### How do I operate on a set of ordered pairs? I want to square each inidividual element of an ordered pair and then add it

$$[{{({-3 a, 3a}), ({-1a, a}}), {({-1a, a}), ({-1a, a}}})]$$ I have a calculation that will give me a lot of these ordered pairs. What I wish to do next is square each element and add it to the ...
2answers
147 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 ...
3answers
133 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 ...
4answers
649 views

### Partitioning with varying partition size

How can I partition a list into partitions whose sizes vary? The length of the $k$'th partition is a function $f(k)$. For example: if $l = \{1, 2, 3, 4, 5, 6\}$ and $f(k) = k$. Then the partitioning ...
3answers
130 views

### How can I use the overhang argument to Partition to avoid using PadLeft and PadRight here?

Say I have a list of values v = {v1, v2, v3, ... }. I need to partition these values to perform operations with a sliding window (think ...
3answers
108 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 ...
1answer
85 views

### How does LongestCommonSubsequence work?

When I recently came across this posting about LongestCommonSubsequence I was curious about how the function worked. ...
2answers
116 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 ...
0answers
60 views

### Mathematica not giving numerical answer [closed]

Here's my simple function: ...
1answer
93 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: ...
5answers
188 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 ...
1answer
115 views

### Sorting a matrix alphanumerically

Somewhat related to Sort matrix by columns and rows without changing them, but more general. I'd like to sort a square matrix (a 3 by 3 in my case, but surely the general solution will treat any), ...
5answers
242 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 ...
2answers
117 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 ...
2answers
81 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 ...
1answer
77 views

### joining lists based on content

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

### Picking certain pairs according to a condition

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., ...
1answer
81 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 ...
1answer
120 views

### question about Inner

question1: (code 1 something wrong, Why? and how to overcome this to achieve the next code's effect) ...
4answers
120 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) ...
1answer
56 views

### How to normalize parts of matrix elements?

To normalize the last 2 or more columns of a matrix, ...
1answer
70 views

### Breaking up data and finding independence

Suppose I have the list with elements (either 1 or 4 as the last digit) as follows: ...
3answers
81 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 ...
2answers
239 views

### How to punch a hole in some 3D distribution of points

Suppose we have a long list of 3D Cartesian coordinates, defining a distribution of random points in 3D space. How could we remove all the points inside a sphere of radius ...
1answer
95 views

### Statistical analysis of data-list with recurring x-values

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

### Replace elements in a list

Suppose that I have a list: ...
0answers
61 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 ...
0answers
88 views

### Derivatives of list elements

Could someone explain the odd behavior of the Derivative function when drawing arguments from lists? We have, ...
2answers
96 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. ...
1answer
74 views

### Using a loop to make a new list by taking elements from multiple lists [closed]

I have defined three lists and I need to be able to take elements from them periodically and put them in a new list. I know I need to use some form of a loop but I am at a loss. Any suggestions?
4answers
220 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 ...
1answer
78 views

### Dynamic List Building and Exporting [closed]

My ultimate goal is to have a text file that contains the following information in the following format exported to a text file: ...
1answer
56 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 ...
1answer
105 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 ...
3answers
228 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 ...
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 3, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9190378189086914, "perplexity_flag": "middle"}