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 ...
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 ...
165
votes
6answers
19k views

How to compile effectively?

What are the best practices of compiling functions? I understand that this is a vague question, but let me list some aspects that might trigger useful answers. Some of these have already been answered ...
112
votes
3answers
6k views

What is a Mathematica packed array?

A simple sounding question with a few sub questions: What is the difference between unpacked vs packed array? Are packed arrays more space efficent, how much so? Are packed arrays more time ...
95
votes
4answers
3k views

What best practices or performance considerations are there for choosing between Cases, Position, Pick and Select?

Cases, Select,Pick and Position each have different ...
73
votes
3answers
8k views

Metaprogramming in Mathematica

Being functional, and having no "quotation", i.e. essentially treating data and programs semantically same, Mathematica seems naturally capable of doing metaprogramming. But could anyone construct a ...
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 ...
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: ...
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 ...
23
votes
4answers
1k views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
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 ...
9
votes
4answers
336 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 ...
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: ...
13
votes
3answers
462 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 ...
14
votes
2answers
997 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 ...

15 30 50 per page