Linked Questions

1 vote
1 answer
103 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 ...
Xavier's user avatar
  • 155
156 votes
9 answers
15k 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 ...
Ali Hashmi's user avatar
  • 8,940
183 votes
6 answers
24k 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 ...
István Zachar's user avatar
122 votes
3 answers
9k 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 ...
nixeagle's user avatar
  • 2,263
99 votes
4 answers
4k 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 ...
Verbeia's user avatar
  • 34.2k
83 votes
3 answers
9k 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 ...
user13253's user avatar
  • 8,666
47 votes
5 answers
2k views

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

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
ArgentoSapiens's user avatar
16 votes
8 answers
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: ...
Nick's user avatar
  • 390
20 votes
4 answers
3k 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 ...
Meqdad's user avatar
  • 433
24 votes
4 answers
2k views

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
P. Fonseca's user avatar
  • 6,665
15 votes
3 answers
2k 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 ...
MMM's user avatar
  • 643
10 votes
4 answers
653 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 ...
Chris K's user avatar
  • 20.1k
6 votes
4 answers
655 views

Find min and max indices of highest and lowest elements in sorted list

I have a list of integers of the form ...
az123p's user avatar
  • 239
17 votes
2 answers
230 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: ...
b3m2a1's user avatar
  • 46.8k
14 votes
3 answers
739 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 ...
P. Fonseca's user avatar
  • 6,665

15 30 50 per page