Simulation is the imitation of the operation of a real-world process or system over time.

learn more… | top users | synonyms

0
votes
0answers
68 views

Stochastic Simulation using the Gillespie algorithm

I'm trying to reproduce the simulation with demographic stochasticity in Figure 1 from the paper entitled "Dynamical Resonance Can Account For Seasonality of Influenza Epidemics" ...
5
votes
1answer
287 views

Is there a free version of the Springer book “Mathematical Statistics with Mathematica”?

Is there a free version of the Springer book: $$\text{Mathematical Statistics with Mathematica}$$ by Rose and Smith ... available on the internet?
0
votes
2answers
68 views

Numerical simulation - getting slower the more data I have [closed]

I'm simulating the trajectory of a charged particle. I have the coordinates saved in the list $coor$ ({{0,0,0},{0.1,0.1,0.003}, etc}) as the time goes on this array is getting bigger and the ...
2
votes
1answer
87 views

Simulating a bounded continuous random walk in $n$-dimensions

You're given three $n$-dimensional real vectors, $\mathbf{x_0}$, $\mathbf{a}$ and $\mathbf{b}$, with $\mathbf{a} \le \mathbf{x_0} \le \mathbf{b}$ (vector inequality means component-wise inequality). ...
5
votes
3answers
220 views

Split list of states by run lengths and discontinuous changes in state

I was asked to look into writing some simulation code for a user, where the simulation output (x) would oscillate between three possible states: ...
0
votes
0answers
31 views

Works in mathematica but not as cdf preview or web embedded cdf [duplicate]

I have a curvature simulation with the help of m_goldberg that works in mathematica but does not work as a cdf in cdf preview. In mathematica it says nothing while in cdf preview or while web embedded ...
3
votes
3answers
124 views

how can I make a control for my vector equation in my simulation?

I'm trying to build a control selector or menu for equations to put into my curvature simulations. However all the code I've tried hasn't worked.Does anyone know how I could make a control selector or ...
1
vote
1answer
91 views

Randomly generated polymer with certain spatial density

For simplicity's sake, let the polymer's composing particle be integer 3-tuples (on 3D Cartesian grid), such that: Polymer-ness -- for all particle there is an directly adjacent neighbor. i.e in ...
7
votes
0answers
628 views

Resources on Mathematica and strong AI (a.k.a. AGI)

David Deutsch (physicist / quantum computing theorist) wrote an article for Aeon Magazine last year: On Artificial Intelligence that got me thinking. The article assesses and critiques the ...
3
votes
1answer
105 views

How to simulate the 1-D motion of a particle under constant acceleration? [duplicate]

I am trying to represent the position of an object under freefall, but am completely lost. Here is my attempt so far: ...
3
votes
1answer
54 views

RandomVariate does not evaluate a Hyperbolic Distribution

Any Idea why I can't get a result from this expression: ...
1
vote
1answer
127 views

Simulation code performance tuning

The following simulation takes over 20 seconds for evaluation. I have difficulty re-coding it with Nest and Map or Compile functions to make it more efficient. Can some one help with this? The ...
0
votes
1answer
80 views

marking the points of x-intercept on a plot

OK, I have a nice plot of some oscillating motion. I can read some stuff off the graph, but I thought it would be cool to show a dot where the curve hits the x-axis and a little label showing the ...
12
votes
3answers
502 views

How can I simulate this toggle mechanism?

I've been introduced to Mathematica very recently. Basically, I haven't actually "solved" anything in my Mathematica lifetime, but I've done some simulations. With my fractional knowledge, I tried ...
0
votes
1answer
58 views

Moving the start of a graph to the right, finding maxima in an oscillator

I have the following code written to simulate a driven damped oscillator ...
0
votes
1answer
54 views

NDSolve with arrays and Tables of Equations and WhenEvent

I've been toying around with NDSolve for a while, and read through the website. By doing so I discovered that I could use it for vectors and arrays with much pleasure. So I wanted to write a simple ...
3
votes
1answer
240 views

Simulating a quick return mechanism

Last time, I got a satisfying answer for simulating a toggle mechanism, just as expected. NDSolve is great. I tried playing with it (as a matter of fact, @MichaelE2 ...
89
votes
7answers
14k views

How to generate a random snowflake

'Tis the season... And it's about time I posed my first question on Mathematica Stack Exchange. So, here's an holiday quest for you Graphics (and P-Chem?) gurus. What is your best code for generating ...
2
votes
0answers
451 views

Solar system simulation (n-body physics) with OpenCL

I would like to simulate a n-body solar system in Mathematica. I have found the following example: ...
4
votes
5answers
362 views

Problem using WhenEvent to constrain solution

Note: This question has also been posted at the Wolfram Community Problem: Simulate pressure in volume 1 and 2 for 1 second. The circuit is as follows: From this I set up the governing DE for ...
8
votes
2answers
287 views

Impact Crater Simulation

I have been trying to model crater formation on a given planetary surface - $500\,\textrm{km}^2$. The locations of impacts are random, however, if an impact is within $30\,\textrm{km}$ of another, the ...
4
votes
4answers
636 views

Finding the area of a circle using monte carlo simulation [duplicate]

I wrote the following code to find the area of the circle $x^2+y^2=1$ using monte carlo simulation : ...
14
votes
3answers
852 views

Finding the volume of a sphere using the Monte Carlo algorithm

I used the following code to find the volume of the sphere $x^2+y^2+z^2 = 1$ in the first octant: ...
0
votes
0answers
120 views

Approximating a stochastic integral with a Wiener process

I would like some assistance to solve the following: $\sum\limits_{i=0}^{n-1} e^{-k(n\Delta t -i\Delta t)}\Delta z_i$ where $z$ is a Wiener process, $\Delta z_i = z((i+1)\Delta t)-z(i\Delta t)$. ...
11
votes
2answers
564 views

How to improve the accuracy of this Monte Carlo simulation

A friend of mine went on an interview and he was asked to calculate the angle between the hour hand and minute hand of an analog clock when the time was 3:15. Arguably, this is a trivial problem that ...
16
votes
1answer
407 views

Simulating Theatre puzzle

I have been trying to simulate the process of the theatre puzzle from the Joy of X (Strogatz). The puzzle, and some relevant material are here. My simplistic coding for this process follows: ...
4
votes
1answer
206 views

Changing a wave simulation

I want to adjust some code that I found on this Wolfram Demonstration: http://demonstrations.wolfram.com/WaterRipplesPassingThroughASlit/ Basically it shows a wave passing through a single slit. I ...
1
vote
1answer
181 views

Calculating mean of multiple stochastic processes and setting a lower threshold

Thanks to “Rod Lm” I got some very nice input for the following problem. My intention is to simulate within a Manipulate function a given number of possible stock ...
0
votes
1answer
95 views

Random variation inside NMaximize

I am using NMaximize as following code. ...
1
vote
2answers
195 views

Problem in simulating discrete time stochastic

I have been playing with some stochastic questions and specially the problem here.It seems no matter for the first time in bet, gambler is going to lose the first bet.Am I right?How can we correct the ...
1
vote
1answer
174 views

Making an animated simulation without procedural loops

I'm still new to Mathematica and this is the first time I've wanted to do something more complicated than plotting and changing parameters of mathematical functions. I want to make a simple ...
12
votes
3answers
2k views

How to do System dynamics simulations / diagrams in Mathematica?

System dynamics is an approach to understanding the behaviour of complex systems over time. It deals with internal feedback loops and time delays that affect the behaviour of the entire system. What ...
11
votes
2answers
2k views

Creating a simulation of our Solar System

As the title says, my objective is to create a simulation of the motion of the planets in our Solar System using Mathematica. All the theoretical background regarding the equations of motion of ...
5
votes
2answers
2k views

Making mathematical animations with Mathematica

I recently stumbled upon the Cycloid and was working on finding its length and such when I found this animation on Wikipedia. Strikingly pretty and small in size too (66KB) So on searching how he ...
5
votes
2answers
200 views

Simulating a Stochastic Process within certain bounds

I would like to simulate paths of a Geometric Brownian Motion till it hits one of two barriers, say 10 or 200. ...
-2
votes
1answer
181 views

Symbolic Simulations

I have 9 nonlinear equations and 10 unknowns. It is not possible to obtain a numeric solution but I do get a parametric solution. It is useful in my case because I want to observe how parameters (p1, ...
12
votes
3answers
446 views

Simulate a simple spinner

I'm teaching some simple ideas in probability to students in grade 7. The "spinner" below works, but I'm wondering how I could make it just a bit more realistic by having it actually "spin" around a ...
12
votes
1answer
428 views

Simulating discrete time stochastic dynamic systems

What is the canonical way of simulating discrete time stochastic dynamical systems in Mathematica using the new functionality of Random processes? To take a concrete example, lets consider the ...
3
votes
2answers
288 views

How do I represent a system dynamics feedback loop?

In System Dynamics, if I want represent the relationship between Speed and Distances, I create a Flow (Speed) and a Stock (Distance) as you can see in this Insight Maker Sample . Heres an Image of how ...
11
votes
2answers
510 views

Efficient GeometricBrownianMotionProcess Monte Carlo simulation

Following the answers in this post, I'm trying to implement something similar. If the GBM stays inside the corridor [L, U] between predefined times it should return ...
5
votes
1answer
727 views

Monte Carlo simulation using geometric Brownian motion

I'm relatively new to Mathematica programming, so forgive my rather unsophisticated question: I'm trying to do a Monte Carlo simulation using geometric Brownian motion (GBM). I want to write a ...
7
votes
1answer
266 views

1D Random Walk with Excluded Sites and Variable Time-Step

Here is the physical problem I would like to simulate: Consider the following variations to the 1d random walk: allow for certain, random sites to be excluded with probability 1/2. allow for the ...
5
votes
1answer
504 views

How to start simulating physical problems?

I'm quite new to Mathematica, I have version 9. I need to use it to simulate some physical problems. I know the equations (like Maxwell's equations and Newton's laws and so on), but I have no real ...
8
votes
2answers
530 views

Fluorescence Correlation Spectroscopy Simulation

I am simulating Fluorescence Correlation Spectroscopy which basically involves tracking the random motion of particles in a box with periodic boundary conditions and then calculating their intensity ...
11
votes
2answers
428 views

Fast Simulations with Compile

this post relates to another post that I didn't follow up propely. If I wanted to simulate a system of stochastic proesses like the following, and loop over this run many many times would writing the ...
3
votes
0answers
243 views

How to save (large) data generated from simulations

The following is a simple example of a much larger simulation that I want to run Define some processes ...
2
votes
1answer
250 views

Speed up iterated manipulations of a graph / table

I am trying to generate a version of Watts' model of cascading shocks to a network following the discussion on p. 20-25 of this article. The basic premise is to use the ...
14
votes
1answer
497 views

Simulating Stochastic Processes the MMA way

This question is really a specific problem and a methodological one concerning MMA best practices. I want to simulate a system of stochastic processes. If this were a geometric Brownian motion or ...
6
votes
4answers
965 views

3D Random Walk with Periodic Boundary Conditions

I am working on a 3D random walk with periodic boundary conditions and have written a program that will do this for me but it is extremely slow. Does anyone have any suggestions on how I could speed ...