Linked Questions

165
votes
19answers
11k 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?...
94
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 ...
37
votes
6answers
4k views

How to splice together several instances of InterpolatingFunction?

I have a set of InterpolatingFunction returned by NDSolve which are valid over different (but overall continuous) domains. How ...
17
votes
7answers
931 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!...
80
votes
1answer
2k views

Incompatible Changes since Mathematica Version 7?

There is documentation of the incompatible changes made to Mathematica with each major release: Incompatible Changes since Mathematica Version 1 Unfortunately that documentation simply stopped ...
15
votes
8answers
2k views

Find longest sequence of zeros in list

How it is possible to find the length of the longest sequence of zeros in list {1,0,0,1,1,0,0,0,0,1,0,0,0,1,1,0,0,1} which is equal to 4 in the sample list above
14
votes
2answers
801 views

How to interpret the FullForm of a SparseArray?

SparseArrays are atomic objects, but they do have a FullForm which reveals information about them. What is the meaning of the ...
14
votes
4answers
646 views

Generating Linear Extensions of a Partial Order

Given a set $S$ and a partial order $\prec$ over $S$, I'm looking for a way to "efficiently" generate a list of linear extensions of $\prec$. Suppose the partial order is given by a ...
12
votes
2answers
715 views

What are some useful (or hidden) properties of MeshRegion?

There is quite a bit of powerful functionality built in to MeshRegion, but it seems to be lacking in some areas. For example: extracting a list of edges that live ...
5
votes
3answers
956 views

SparseArray row operations

Given a large (very) sparse matrix, A, how can I efficiently "operate" on only the nonzeros in a given row? For example: For each row in A, generate a list of column indices that have a magnitude (...
2
votes
2answers
2k views

Get positions of all non zero matrix elements

I want to find all non zero elements of a table and I want to create a list that contains the name of the table the element was removed from, the position of the element, and the value of the element. ...
11
votes
3answers
200 views

Support for low-complexity (compressible) lists

By "low-complexity list" I mean a list like the following: lcl = {17, 17, 17, 17, 17, 21, 21, 21, 21, 21, 21, 21, 21, 11, 11, 11, 11, 11, 11, 11} ...
3
votes
4answers
409 views

Replace non-zero elements with symbol

I have a very large matrix (tensor) in Mathematica with some zero and non-zero elements. I am interested in replacing the non-zero elements with some symbol or a 1 so that it is easier to view the ...
6
votes
3answers
146 views

Replacing pairs of values under constraints in a large nested list

I have a list of integers that looks e.g. ...
6
votes
1answer
357 views

How to find k largest element and their position in a matrix?

I have a sparse matrix, and I am interested in find k largest elements and their positions in the matrix. I do it in the following manner: ...

15 30 50 per page