# list-manipulation's questions - English 1answer

4.672 list-manipulation questions.

### visualization of timedependent flux data

I am trying to visualize some electronic flux data for a quantum mechanical system. I have a file containing electronic flux values and coordinates for different timesteps in a quantum mechanical ...

### 1 Split nested Tables and combine them

I am doing a research and found that the time efficiency of Nested Table in MMA isn't quite well but if you can break it into two single ...

I have a large matrix and I want to extract different sub-matrices that actually have elements on different positions. Using Extract and mention the position of ...

### 1 plotting imaginary data

I had a set of data a5 that had imaginary values but when plotted, that data doesn't shows on the graph. ...

### 4 rule-based combination of sublists

I have a list:lis = {{a},{1,2},{b},{3},{c,z},{d,e,f},{4}}I would like to join adjacent members of this list when both are not integers (or lists of integers), ...

### 4 Pulling sections from a webpage

I'm trying to get specific sections from a webpage using Mathematica. I've started by importing the webpage, and getting the section "headers" that I want: ...

### 1 Selecting elements in nested list

2 answers, 36 views list-manipulation filtering
I want to compare elements in a list that looks like this ...

### 5 Is there a function that compares two lists and take from first the element with the position of largest value at second?

2 answers, 157 views list-manipulation functions
Is there a function in Mathematica that compares two lists and take from first the element with the position of largest value at second: ...

### Getting Values of Replace Elements in an External List

1 answers, 31 views list-manipulation replacement save
I have a list of elements replaced with values:list = {A-> A1, B-> B1, C-> C1,...} saved as an external file using Save...

### 33 Sort lists according to the order of another

4 answers, 5.735 views list-manipulation sorting
I have three parallel lists (i.e. the elements in position i of each list are related). I want to sort the first list using the function Sort and make the same ...

### 3 How can I revert the order of digits of an integer [on hold]

How can I revert the order of digits of an integer? If x1 = 59097585 then I want to receive x2 = 58579095.

### 1 How to find the Fourier Transform of a list?

1 answers, 33 views list-manipulation fourier-analysis
I have a list (list) in the form of {x,y} as ...

### 2 Efficiency limit reached? to “An efficient way to filter out the list elements based on the the elements of the second list”

The challenge is following: There are two lists data1 and data2 of following type: ...

### 91 Flatten command: matrix as second argument

4 answers, 4.010 views list-manipulation matrix programming syntax
One thing I could never wrap my head around is how Flatten works when provided with a matrix as the second argument, and the Mathematica help isn't particularly ...

### 6 Put edges of a matrix to zero

I have to set the first and last rows and columns to zero rows and columns. I tried with the first column: ...

### 1 Plotting legends matching with plots inside the show graph

1 answers, 35 views plotting list-manipulation legending
I need to put legend " real part" for plot n5 and " imaginary part" for plot t5 such a way that, legends colors match up with ...

### 1 delete an element list recursively

2 answers, 49 views list-manipulation filtering
I have a list, say {10,9,8,7,2,3,5,4,3,2,1}What I want to achieve is to delete the elements that are not in decreasing order recursively. Namely, the output ...

### Mapping slots over lists

2 answers, 65 views list-manipulation map slot
In the meantime I'm accustomed to write special character orgies like D[%,#]&/@L (to quickly fish out the coefficients of the last input with respect to ...

### How to show decimal points on the axes frames in mathematica?

2 answers, 71 views plotting list-manipulation
I have a set of data g1 and when plot using n1, i got the plot shown in figure below. I need to change the x-axis label from (1,2,3,4,5...) to (1.0,2.0,3.0,4.0,5.0) and y-axis label from (50000,...

### 1 how rewrite a nested list changing the complex values to their Norm

have this nested list ...

### 4 prepending to elements of a list

I have a list that consists of events occurring on certain dates of certain months. To simplify, the list looks like this: ...

### two list “join” operation [on hold]

for given two list like below:list1 = {10, 9, 8, 7}; list2 = {1, 2, 3, 4};How do I get the desired result like this? ...

### Having Trouble with CountryData [EDITED]

I have a list which I call by countryExportPartners = Table[l = CountryData[][[n]]; {l, CountryData[l, "ExportPartners"]}, {n, 1, Length[CountryData[]]}]I ...

### 1 function over list with condition

For a fake function like:fun[x_] := x^0/x!;and list:list={0,0,0.1,0.2,0.9,0.8,0,0};It will get error in this way cause ...

### 3 Minimise discrete function

Let $f\,\colon\,\Lambda\to\mathbb R$ be a real-valued function, where $\Lambda$ is a finite integer lattice. Say, $\Lambda=\mathbb Z_3^n=\{\vec x\,\mid\, x_i=0,1,2\}$ for some $n\in\mathbb N$. I'd ...

### 4 Converting a test mark list to a new list of consolidated marks

I have a function that takes in a list as an argument Each element in the list is in the form {test number,first name,family name,mark} or ...

### 1 Huffman encoding on Mathematica

1 answers, 596 views list-manipulation algorithm
Taking reference of Huffman code algorithm, ...

### How to tell Mathematica that an argument to a function is a List? [closed]

0 answers, 61 views list-manipulation functions
I'm a complete newbie to Mathematica, with a newbie question. I have a functionmyFunction[xx_] := 1+anotherFunction[xx_](This isn't literally my function, ...

### 19 Simulation of diffusion in a grid

I want to simulate a diffusive process in a 2D grid, for a central initial value of 1 to the adjacent cells initially at 0. At each time step, the value of the +1 level adjacent cells are increased ...

### List Manipulation, Delete Element if the Reverse[Element] is part of the list [closed]

Suppose i have a list of the form ...

### 3 Multiplying x and y coordinates with different scalars?

I have a list of data for which I need to multiply x-coordinates by 63 and y-coordinates by 50 inside the list. The list is in ...

### 1 Positions in array where points fall inside a circle?

I have a list of (x,y) coordinates, and I just want to get the elements in the list where the point x,y falls within a radius r. ...

### 1 List of elements joined by OR condition

A simple command Or[f[1], f[2], f[3]]gives f[1] || f[2] || f[3]How this can be done automatically? I try ...

### 9 How to generate all involutive permutations?

4 answers, 273 views list-manipulation permutation
Take a finite set $S$ (i.e., a list). An involutive permutation is one that squares to the identity. How can we generate all such permutations efficiently, that is, without generating all permutations ...

### 3 A pattern condition involving OrderedQ

I have the following simple code:z = {a, b, c} {{1, 2, 3}, {1, 3, 2}, {3, 2, 1}} /. {a_Integer, b_Integer, c_Integer} /; OrderedQ[z] -> 1which returns ...

### 2 Totally orderless partition

This is a slight variation of: How to generate all possible orderless partitions of a list according to another list? Consider each set following a partition a "box" and each element a "ball". What ...

### 2 ListPlot grouping by elements

3 answers, 70 views plotting list-manipulation
I have data regional data listed by country in this form: ...

### 4 How to find a specific element of a nested list

Consider the following list:{{0.1, 5}, {0.3, 18}, {0.4, 6}, {0.7, 9}, {1.1, 5}}I want to obtain the second element of a sub-list with respect to the first ...

### 2 How to identify similar sublists in a list and visualize the clusters?

2 answers, 51 views list-manipulation visualization
Consider a list (list) as ...

### 2 Normal vector in discrete 3D object

Consider a large array(~42000,3):array={{x1,y1,z1},{x2,y2,z2},...,{xn,yn,zn}};This array forms a certain shape, it may contain cavities or other ...

### 8 Performance improvement: Finite Element Mesh graphics

I have created a Finite Elements mesh on GID (quadrilateral 9 nodes elements). I exported the nodes and the elements topology and i'm reading it from the following two text files: https://www.dropbox....

### 6 How to apply a function to a list only if element is a number

Say I have these lists:ls1 = {1, 2, 3, 4}; ls3 = {"Chales", 10, 10, 10}; ls5 = ls1 + ls3ls5 returns ...

### Rotating a plot with a gradient filling defined by a function

1 answers, 54 views plotting list-manipulation graphics
I'm attempting to combine two problems that were previously addressed in the questions below: Filling an area between two curves with respect to a color function Adding a gradient filling according ...

### 3 Sum in Mathematica gives extra “+List” [closed]

1 answers, 170 views list-manipulation summation
I am just doing the following sum over a listt = Table[i^2, {i, 10}] Sum[t[[i]], {i, 0, 4}]However, the output is ...

### How to get a slope from a contour plot

0 answers, 46 views plotting list-manipulation
I tried to find the slope for the line I got from contour plot for a function(f) in two variables(z,x) using "Get Coordinate" and the slope =12 which is correct, Is there any way to use specific ...