Linked Questions

1
vote
1answer
52 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 ...
15
votes
2answers
192 views

Most efficient numerical selectBetween

Often when I'm working with numerical data I want to select those points within a given range. To do this I generally do something like: ...
4
votes
4answers
620 views

Extracting elements in a list based on conditions [closed]

I have the list \[ScriptCapitalD] = {824, 1082, 1135, 1308, 1359, 1372, 1401, 1412, 1601, 1638, 1641, 1674, 1709, 1805, 1947, 2208} I would like to ...
9
votes
4answers
337 views

Taking Part of an InterpolatingFunction

I want a function to extract part of a one-dimensional InterpolatingFunction, similar to how Take works on lists. Based on the ...
2
votes
3answers
120 views

How to deal with this list problem?

Now, I want to write a function for some kind of list. The input list includes many integers. Take a simple example for f[x], ...
16
votes
8answers
2k views

How to avoid procedural loops in this example?

I want to iterate over a list, and return the index as long as I found the first element satisfying my condition. Written in a for loop: ...
13
votes
3answers
464 views

TimeSeries interpolation with time gap awareness

Is there an option for ResamplingMethod (or any other practical way) for specifying different behaviours of the interpolation, depending on, for instance, closest dates (on the ...
130
votes
9answers
11k views

General strategies to write big code in Mathematica?

I think after six months of exposure to Mathematica and the Wolfram Language I am fairly OK with writing short codes and snippets. However, what are some general strategies to use in order to write ...
14
votes
4answers
324 views

Fast Selections Testing on Inequality

Is there a functional idiom for fast selections testing on inequality? For example, finding values from list a & b where the key is less than or equal to a value, in this case 4 or 9. An ...
10
votes
1answer
1k views

Is there a built-in function to do binary search?

Is there a built-in function to do binary search? Say, given a list (sorted) and a number, find the position which keeps the listed sorted when the number is inserted. I know that ...
9
votes
3answers
358 views

Improving selection of elements from large multidimensional array

Frequently in my profession I deal with large arrays of data. Typically these are mixed types including integers, strings, dates, and reals. To recreate a typical data array: ...
14
votes
2answers
999 views

the more effective method to find 21 digits armstrong number

In recreational number theory, a narcissistic number (also known as a pluperfect digital invariant (PPDI), an Armstrong number(after Michael F. Armstrong) or a plus perfect number) is a number that is ...
18
votes
3answers
2k views

Fastest way to check for List membership

I have a set of say 100 numbers {1,3,7,11,19,...3971}. All elements are previously determined. I want to check whether ...
2
votes
4answers
249 views

Find time since last 0 in list

When I have a list of data (measured per day), is it possible to define a function that gives the nr of days since the data has been 0? I tried working withPosition...
41
votes
5answers
1k views

How can the behavior of InterpolationOrder->0 be controlled?

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...

15 30 50 per page