131k views

### Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
8k views

### How to efficiently find positions of duplicates?

Is there an efficient way to find the positions of the duplicates in a list? I would like the positions grouped according to duplicated elements. For instance, given ...
823 views

### Returning multiple results from a LibraryLink function

What is the best way to return multiple inhomogeneous results from a LibraryLink function? Imagine that the result of a single computation is several tensors of different dimensions and several ...
1k views

### How do I delete all items that occur more than once?

DeleteDuplicates works fine but leaves a single copy of the duplicated item. I need to remove all items that occur more than once i.e. {{1,2},{1,2},{3,4}} -> ...
2k views

### Constructing functions with variable number of output arguments

In Mathematica, you can construct a function f to have different definitions based on its input arguments. For example, ...
824 views

### How to pick increasing numbers from the list

How to pick increasing numbers from the list. lst = {5, 3, 6, 2, 7, 4, 8}; out: {5,6,7,8} So many interesting ...
1k views

### How to rebuild original data from a histogram?

I have data in the following form. I have a list of values and a list of frequencies that indicate how often each value has occurred. Example list of values: ...
109 views

### Listing what has been deleted by DeleteDuplicatesBy

How can I list the items deleted from DeleteDuplicatesBy? For example: ...