Linked Questions

1 vote
1 answer

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

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,960
183 votes
6 answers

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

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

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.3k
83 votes
3 answers

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

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

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

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

How to reduce the InterpolatingFunction building overhead?

I want a linear interpolation from the following example list: ...
P. Fonseca's user avatar
  • 6,665
6 votes
7 answers

How to find the smallest position of an element of an ascending list {1,4,10,12,20} such that the element is not less than 11?

Assume I have an ordered, ascending list {1,4,10,12,20}. I want to find the smallest position of an element of the list such that the element is not less than 11? ...
Display Name's user avatar
  • 2,029
15 votes
3 answers

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

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.3k
6 votes
4 answers

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

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.9k

15 30 50 per page