Linked Questions

15
votes
1answer
911 views

Metropolis-Hastings Algorithm - Significantly slower than Python

I would like to code a Metropolis Hasting algorithm and thought I would get the general scheme of things going with a toy example. I think I got it running but my Mathematica code runs significantly ...
2
votes
2answers
137 views

Functional realisation of do-loop

I'm currently optimising my code and I'm using a lot of loops, so I was wondering if there is a smarter or faster way to do things like: ...
1
vote
1answer
88 views

Optimal way to evaluate a function over many points

This piggy-backs on my previous question: Parameter space search routine is too fast? I am looking for a fast way to evaluate a symbolic list over many points. So lets say I have a list of symbolic ...
2
votes
1answer
276 views

How to illustrate the optimal solution with kinked constraint?

I have a simple optimization problem with a linear, continuous constraint or a kinked constraint. The optimal solution is either a tangent point with f*<T or at the kink with f*=T. The standard ...
1
vote
1answer
279 views

Desktop vs. Cloud option, home plan vs. basic plan: syntax differences

I do not understand why the following simple expression is accepted using a browser (cloud option), but is not accepted using the installed software (desktop option) with the plan basic of Wolfram ...
1
vote
2answers
97 views

Systematically Optimizing Code for Better Runtime

Can someone please tell me how can I learn to systematically optimize my Mathematica code to be faster? I have seen a blog about the same but have no idea where to ...
2
votes
0answers
29 views

Is it possible to profile Wolfram Language code without Workbench? [duplicate]

Are there any tools built into the latest version of Mathematica that would allow a user to run a profiler against packages? I have read this question, but there have been two releases since that ...
2
votes
1answer
102 views

`Solve` Performance Tuning

I'm facing a Problem in Mathematica, where I have to solve a large number of equations generated by an AppendTo. ...
5
votes
7answers
509 views

How to use AppendTo in a While loop? [closed]

I am trying to code a while loop that uses AppendTo to append the loop variable to an empty list. ...
3
votes
1answer
160 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 ...
5
votes
2answers
304 views

Mathematica taking forever to compute

I want to simulate the fresnel diffraction through circular aperture.But mathematica is taking forever to calculate.Here is my code. ...
2
votes
3answers
346 views

Random Geometric Graphs, but fast

I am optimising the random geometric graph generation ideas in this post. I need to generate a large number of random geometric graphs with probabilistic connectivity (soft random geometric graphs), ...
0
votes
1answer
101 views

How can I improve performance of my simulation code?

1) Generate nNsamples from beta distribution (a, b) and the parameter of wighted c ...
8
votes
2answers
616 views

Why won't this compiled function be inlined?

I've been trying to use Compile to get some code to execute more quickly, because I will need to call it millions of times. I've been using the ...
6
votes
2answers
163 views

A box structure with a depth exceeding the maximum allowed depth was encountered

I am trying to perform the task in Mark McClure's article Parametric L-Systems and borderline fractals. I have copied his opening code on the first three pages: ...

15 30 50 per page