# Linked Questions

122 questions linked to/from List of compilable functions
19answers
139k 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 ...
6answers
20k 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 ...
7answers
15k views

### Struct equivalent in Mathematica?

I really miss having something like a struct in Mathematica. I know of (and regularly use) a couple of programming techniques which feel like a ...
2answers
4k views

### InternalBag inside Compile

Since InternalBag, InternalStuffBag and InternalBagPart can be compiled down, it is a ...
2answers
3k views

### How can I add drop shadows and specular highlights to 2D graphics?

I thought I'd share some code in the form of a self-answered question, but other answers are of course welcome. Drop shadows are a familiar visual effect, giving the impression of a graphical element ...
3answers
1k views

### Is using undocumented functionality a Bad Idea™?

Mathematica has a lot of very useful undocumented features. For example a hash table, a built-in list of compilable functions, additional options to CurrentValue, ...
4answers
2k views

### Which Distributions can be Compiled using RandomVariate

Recently, Oleksandr kindly showed a list of Mathematica commands that can be compiled. RandomVariate was part of that list. However, whether this can be compiled depends upon the distribution that is ...
1answer
2k views

### Has this implementation of FDM touched the speed limit of Mathematica?

Still, I'll use the implementation of the 1D FDTD method (you can simply understand it as a kind of explicit finite difference scheme for the Maxwell's equation) as the example. Just for completeness, ...
2answers
5k views

### List of Parallelize[]-able functions

The question is clear and is inspired by this question and the first comment on this question. Although there are many tricks for parallelizing things that are not ...
3answers
498 views

### sudden increase in timing when summing over 250 entries

I see a sudden increase of Timing by a factor of thousands when I sum over 250 elements of a matrix rather than over 249. So for instance, this table contains sums ...
17answers
8k views

### Generating a list of numbers that are not multiples of 4

I want to write simple code that will list all numbers from $1$ to $n$ that are not multiples of $4$. And in this case I consider that ...
5answers
7k views

### Axis/Angle from rotation matrix

With r = RotationMatrix[a, {x, y, z}] I can compute a 3D rotation matrix from its axis/angle representation. Given a 3D rotation matrix ...
1answer
567 views

### Removing calls to MainEvalute when using inlined compiled closures

This question is tightly related to the answer Shaving the last 50 ms off NMinimize. There @OleksandR shows how inlined closures can be used to eliminate calls to ...
3answers
1k views

### Image segmentation by pixel value

I'm looking for a way to segment a grayscale image (or a 2D array) by its pixel values. We look at two neighboring pixels, if their values are close within a certain threshold, then we say they are ...
1answer
383 views

### Solver for COVID-19 epidemic model with the Caputo fractional derivatives

As it is known in biological system with memory it would be suitable to use fractional derivatives to describe evolution of the system. In a current version of Mathematica 12.1 there is no special ...

15 30 50 per page