Questions on expression testing and manipulation through pattern matching and constructing efficient patterns.
6
votes
3answers
234 views
Replacement rule only matches part of expression
I have the result of a calculation (which is too long to mention here) and it gives
...
8
votes
4answers
219 views
Check in a series if there exists adjacent values with less than a certain number of missing values
I'm working with a large number of series of different experiments, where there exist a lot of experiments where there are no entries. I now want to draw a sample where there should exist at least ...
18
votes
2answers
595 views
Pattern to match a non-empty list of non-empty lists
Is there a pattern to match a list of lists, containing at least one list, with each list containing at least one element?
In the Mathematica documentation it says that the pattern
...
20
votes
2answers
303 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 (...
44
votes
4answers
747 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 ...