Linked Questions

12
votes
1answer
30k 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,...
8
votes
5answers
412 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: ...
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/...
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?
2
votes
2answers
990 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}}} ...
2
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
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 ...

15 30 50 per page