All Questions

Tagged with
Filter by
Sorted by
Tagged with
7
votes
4answers
561 views

Find elements of array with largest absolute value

I am wondering how to do in Mathematica the following: Given as an input a large array, I want to output a list of top $n$ entries with largest absolute value + their location within the array. ...
2
votes
0answers
98 views

dynamic binary search

Suppose I have a time series of values $v_1, \dotsc, v_n, \dots,$ (think of the data as being generated by repeated function calls, like a Python generator, or being captured in real time) and I want ...
12
votes
2answers
1k views

Efficiently searching a list for the position of the closest number to a specified number

Searching by closest and position I wasn't able to find an answer—but found Nearest by guessing. Nearest, however, returns ...