# Linked Questions

4answers
2k views

### Cases vs Select, Pattern vs Pure function [duplicate]

What is the difference between having Cases with selection condition presented by pattern and a with pure function as condition? ...
2answers
1k views

### Selecting list entries with a True False index list of similar length [duplicate]

I would like to determine which elements in a list are divisible by a specific number, lets say 3. I generate a list with numbers: numbers = Range; I then ...
1answer
152 views

### Whats the difference between Cases and Select? [duplicate]

Im trying to further my understanding of mathematica coding and came up across this question. What is the main difference between Cases and ...
20answers
14k views

### What are some useful, undocumented Mathematica functions?

There have already been some questions about some undocumented functionality in Mathematica. Such as (please add to these lists!) How can one find undocumented options or option values in Mathematica?...
6answers
21k 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 ...
6answers
6k views

### Finding all elements within a certain range in a sorted list

Suppose we have a sorted list of values. Let's use list = Sort@RandomReal[1, 1000000]; for this example. I need a fast function ...
7answers
980 views

### How to find all the positions of max value of a list efficiently?

For Example, list=RandomInteger[{1,100},2000]. Yes,I know Position[list,Max[list]] can do. But it's based on pattern matching!...
2answers
2k views

### What are SparseArray Properties? How and when should they be used?

A strange undocumented form of SparseArray is increasingly used in answers on this site: ...
3answers
2k views

### Select performance

I am fairly new to mathematica and working my way thru Paul Wellins book on Mathematica programming so experimenting with various language constructs. I was experimenting with ...
2answers
793 views

### How can I ensure that I am constructing patterns in the most efficient way possible?

Inspired by this answer, I am interested to know if there are best practices or rules of thumb for constructing patterns, for example for use in function definitions (...
2answers
3k views

### How do I find the elements in a list that return the highest value for a function?

Suppose we have a list of values and a function f. I want to find which of the elements maximizes the return value of the function in Mathematica. Let call the ...
2answers
525 views

### Matching pair of numbers {a,-a}, where a is numeric

Imagine you have a list of pairs of numbers, such as {{2,-2}, {1,5}, {1,-3},{-3,3}} The task is to reduce the given list to a list of pairs of type ...
1answer
999 views

### Finding the longest word in a list (WordList[])

Hi guys I am having problems with finding the longest word available in WordList["English"] I have found that the longest word has 24 characters thanks to this ...
1answer
173 views

### Why Cases and Select treat the List differently?

Look at these two examples: In:=Select[f[i], MatchQ[_f]] Out:=f[] In:=Cases[f[i],_f] Out:={} It seems that the Select take $f[i]$ as List, but Cases ...
2answers
155 views

### Deleting unwanted elements in lists of words

I have imported Alice in Wonderland into Mathematica. I have made a list of the sentences and further divided them into words. Now suppose, nominally, I have the following list: ...

15 30 50 per page