Linked Questions
22 questions linked to/from How to find rows that have maximum value?
23
votes
5answers
15k views
How to find the phase difference of two sampled sine waves?
I'm trying to measure a phase difference between two Sine functions I've acquired with a computer. I'm uploading one of the .txt files with the data I'm working with here: txt file. To remove the ...
8
votes
5answers
452 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:
...
3
votes
5answers
2k 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
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 ...
1
vote
4answers
97 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 ...
13
votes
3answers
1k views
Considerations when determining efficiency of Mathematica code
I have two segments of code that do the same thing and I want to determine the which is more efficient.
What are the considerations when determining efficiency of Mathematica code?
Correctness/...
0
votes
3answers
333 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 "...
2
votes
2answers
1k 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}}}
...
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?
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 ...
17
votes
1answer
23k 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] ...
15
votes
1answer
34k 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
1answer
1k views
Which integration strategy to use for this product of polynomials?
What would be the ideal integration strategy for a function like this: $$f(x_1,x_2,\dots,x_N)=\prod_{i=1}^Nx_i^{c_i}\Theta(x_i-p_i)$$ where $x_i,p_i\in \mathbb{R}$, $\Theta$ is the Heaviside function ...
1
vote
1answer
58 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 ...
0
votes
1answer
48 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 ...