132 views

### How to delay the definition of a function from the time of package initialization to when it is first called

I am writing a package where a couple defined functions take a very long time define at initialization time (because they are large CompiledFunctions). However ...
369 views

### Paging RAM in case of memory shortage issue

Is there some way in Mathematica where I can issue execution of some command with letting Mathematica use my hard disk in case it is short of RAM. It will drastically reduce the speed but I am fine ...
596 views

### Do loop - variable does not change [duplicate]

I got the follwing code which should add a '1' 100 times to an empty list. plotVals = {} Do[Append[plotVals, 1], {l, 1, Nmax}]; The output is again an empty ...
401 views

### Recursive Function Numerical Integration

I just tried to modify a code snippet for Neumann series to the Fredholm integral equation $f(x)= \sqrt{x} - \int^1_0 dy\; f(y) \sqrt{x y}$ which I read in another post: How to solve an integral ...
371 views

### Choosing PrecisionGoal and AccuracyGoal for decomposed integral with NIntegrate [closed]

Assume I have a complicated integral $I$ which can feature all kinds of difficulties like infinite interval, rapidly oscillatory integrand, integrable singularities and numerically almost singular ...
102 views

### Access to the temporary solution in NDSolve with StepMonitor

I want to step-monitor at each time step of a spatio-temporal NDSolve (using the finite element method) the maximum bending of the function sampled over the curent mesh. For this I first need access ...
186 views

### Improve recursive function (memoization)

These days I am trying to rewrite the following recursive function, in order to gain some speed. It is crucial because I end up using 4-5 similar functions, and I need to decrease execution time. ...
127 views

### How to efficiently manage lists of arbitrary length?

I am running calculations that will generate a list of lists of integers. Throughout the calculations, the number of lists will increase, and already-existing lists will be added to. What is the ...
88 views

### a recursive function using memoization

I have looked at a lot of these cases, e.g. Can one identify the design patterns of Mathematica? and the included ones. My trimmed example, here establishing the 'initial conditions' (where the ...
105 views

### Optimizing repeated function calls

Easiest way to keep my library nice, is to naively call some functions many times with same parameters. Doing so prevents from zoo of (library-)global variables and complicated initialisation ...