Linked Questions

13
votes
2answers
1k views

Dynamic Programming with delayed evaluation

By using dynamical programming, we can save intermediate steps for recursive relations, as in f[n_]:= f[n] = f[n-1] + f[n-2] However, this only stores ...
8
votes
2answers
853 views

Dynamic plot with synchronization of real time

I want to do a dynamic plot with synchronization of real time, that is, I have a function, f[t], that is a function of time (seconds), so I want to see the curve changing not so fast or not so slow, ...
67
votes
1answer
2k views

Is this the most effective and efficient programming style for prototyping (a ray tracer) in Mathematica?

I am trying out Mathematica as a prototyping tool. As an initial exercise I have put together a brute force ray tracer, with a view to using Mathematica's built in probability distribution functions ...
5
votes
2answers
272 views

ParallelMemberQ

I tried to make a parallel version of MemberQ for use with a large list, but failed miserably in terms of performance. I used Partition to subdivide the list and ParallelMap to perform the MemberQ ...
6
votes
2answers
180 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? ...
8
votes
2answers
614 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
337 views

EventHandler and Refresh rate

Based on the example of the Documentation of MousePosition, Properties and Relations, here is my test code using "MouseDragged" instead of "MouseClicked": ...
2
votes
6answers
534 views

Color points in list plot based on whether they satisfy an equation

I wanted to create a set of points (a,b) such that a, b are both integers between -6 and 6. Then I want to color all points (a,b) that satisfy $|a-b|\ge2$ red, and all the remaining points blue. I ...
5
votes
2answers
303 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. ...
1
vote
3answers
311 views

professionalize/optimize my code that calls a function

I have the following construction, which defines a function that I subsequently call in a loop multiple times. I use this very often, but I have never looked into if there is a more professional way ...
4
votes
1answer
370 views

Sample of the random times at which the random walk crosses the boundary

I defined a security boundary for a random walk: ...
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: ...
2
votes
3answers
344 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), ...
2
votes
1answer
646 views

Understanding execution time in nested loops

I have the following simple code ...
3
votes
1answer
934 views

How to estimate the running time of a programme on mathematica [closed]

I am solving a system of 6 linear equations containing six unknowns using mathematica. It is taking too much time and still running after 3 hours. can I estimate the approximate running time? Is there ...

15 30 50 per page