Linked Questions

0
votes
1answer
34 views

Finding the minimum value in a column and extracting the row where the minimum value placed there [duplicate]

I have a list of random numbers. In each row there 5 numbers. I want to find the minimum value of the first column and extract the row where the minimum value placed there. How can I do it using ...
1
vote
1answer
53 views

Choosing data from list and plot [duplicate]

I have a data set like below: Angle={5.48575, -0.669213, 45.9832, 8.63878, -16.8777, 50.022, -41.8882, -45.956, 28.3005, 35.8234} Now want to select the ...
8
votes
5answers
401 views

Slot # corresponding to subset of a list in select

Is it possible to use # in the select function preserving the structure of the list? Here an example of what I mean. Let's say I want to select all the pairs where the first element is 1: ...
1
vote
4answers
92 views

Modifying a function so that it will take multiple conditions [closed]

How can I modify my function so that it will take a list of ordered pairs, and return just the pairs whose first value is greater than or equal to a given minimum and less than or equal to a given ...
19
votes
17answers
7k views

Generating a list of numbers that are not multiples of 4

I want to write simple code that will list all numbers from $1$ to $n$ that are not multiples of $4$. And in this case I consider that ...
13
votes
4answers
1k views

I have the minimum Y value. I want to find the corresponding X value from the list [duplicate]

I have a very big file and contains data in the format of {x,y}. I got the minimum Y value by using data[[All, 2]] // Min[#] & Now I want to get the X value ...
17
votes
7answers
943 views

How to find all the positions of max value of a list efficiently?

For Example, list=RandomInteger[{1,100},2000]. Yes,I know Position[list,Max[list]] can do. But it's based on pattern matching!...
0
votes
2answers
2k views

Extract X value from corresponding Y value from a List or Transpose [duplicate]

I have a list of X values and Y values separately, and also together with: data=Transpose[{X,Y}] This data is from a chromatogram, and I want to extract the ...
11
votes
1answer
29k views

Finding the position in a list where the maximum or minimum value occurs [duplicate]

We can use Max[exampleList] or Min[exampleList] to find the maxima and minima of exampleList,...
3
votes
5answers
1k views

Minimum in a nested list [duplicate]

I have a nested list of {x,y,z} and I want to find out the values of x and y where z is minimum. I can write a nested For loop and do it ...
13
votes
1answer
21k views

Table - find index of the maximum element [duplicate]

Let's suppose that I have table t = {1.23, 3.4, 10, 34, 1.78, 0.98, 12.56}. To take the biggest element I can use Max[t] ...
2
votes
2answers
983 views

Deleting parts from a nested list

I have a very long nested list. Here is a short example: list = {{1.2, {1, 1, 1, 1}, {2, 2, 2}}, {0.9, {3, 3, 3, 3}, {4, 4, 4}}, {1.4, {4, 4, 4, 4}, {5, 5, 5}}} ...
0
votes
3answers
332 views

How to get back name of the number from Max function? [duplicate]

So I have this question, using a toy example: a={1,"this"}; b={2,"that"}; result=Max[0,a[[1]],b[[1]]] the result will be 2. However what I want to obtain is "...
1
vote
2answers
2k views

extracting the rows of a matrix satisfying a condition (e.g. all elements negative)

I have a matrix with thousands of rows and want the submatrix comprising the rows of the original matrix that have, e.g. a negative element in column 3. How to do that?
129
votes
8answers
7k views

Can one identify the design patterns of Mathematica?

... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed .Net/...

15 30 50 per page