Linked Questions

2
votes
2answers
80 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
311 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
103 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
227 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
323 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
95 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
583 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 ...
5
votes
2answers
149 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: ...
9
votes
2answers
650 views

Optimizing Mathematica Code

I have implemented the whole Baum-Welch Algorithm for training Hidden Markov Models as described in Rabiner's paper Here is my code that calculates the Forward Probabilities` ...
1
vote
0answers
91 views

Mathematica using all available cores, but not speeding up calculation as much as expected

This is a follow-up question to my previously posted question on how to get Mathematica to use all available cores to do a parallel calculation. I resolved this by rewriting the code in terms of a <...
6
votes
2answers
161 views

Achieve performance that is competitive with numpy [duplicate]

What are the best practices to ameliorate time performance of Mathematica? As a practical example how we can decrease timing below? ...
0
votes
0answers
112 views

Performance tuning with memoisation, compilation and vectorization - further possibilities?

In order to tune the performance of noticeably slow code of mine, I had a look at many different excellent posts on this topic here on M.SE, e.g. here to name the most interesting one. Now I ask ...
3
votes
0answers
92 views

How to make reading from long lists faster?

Background I am using Mathematica to solve a traveling-salesman-like problem. I implemented two different algorithms that are able to solve this type of problem and both algorithms yield the same ...
4
votes
4answers
353 views

Combination of lists elementwise

I have two lists: x = Range[1, 10, 1] y = Range[2, 10, 2] How can I produce a list consisting of the following elements (first element is the x value, second ...
1
vote
1answer
83 views

Compilation without MainEvaluate

I'm trying to avoid MainEvaluate in CompiledFunction. I've tried below but I couldn't get rid of it. I'd appreciate any help!! Here f1 and f2 will be rank 1 list with real type. ...

15 30 50 per page