Linked Questions

213 votes
26 answers
17k 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?...
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.3k
43 votes
6 answers
6k 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 ...
polyglot's user avatar
  • 775
22 votes
9 answers
1k 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!...
WateSoyan's user avatar
  • 1,854
17 votes
10 answers
3k 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
Филипп Цветков's user avatar
83 votes
1 answer
3k 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 ...
Mr.Wizard's user avatar
  • 272k
14 votes
4 answers
825 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 ...
Zach Langley's user avatar
13 votes
2 answers
1k 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 ...
Szabolcs's user avatar
  • 235k
14 votes
2 answers
1k 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 ...
leibs's user avatar
  • 758
5 votes
3 answers
1k 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 (...
leibs's user avatar
  • 758
2 votes
2 answers
3k 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. ...
olliepower's user avatar
  • 2,254
12 votes
3 answers
217 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} ...
kjo's user avatar
  • 11.7k
7 votes
2 answers
465 views

directly change the background value of a SparseArray?

given a SparseArray s = SparseArray[{1, 10} -> 1, {1, 10}, a] I can extract the background value (see What are SparseArray ...
george2079's user avatar
3 votes
4 answers
927 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 ...
Daniel Ward's user avatar
2 votes
1 answer
2k views

How to find position of non-zero elements in SparseArray without converting to a dense object

Overview So I have a SparseArray, sparse, constructed from a list of rules, with the dimension options. Given a row, I want to know where the values are non-zero. ...
SumNeuron's user avatar
  • 5,422

15 30 50 per page