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

learn more… | top users | synonyms

4
votes
2answers
332 views

Simple Monte Carlo simulation

I want to find the Monte Carlo simulation of the integral $$\int_0^1 \sqrt{1-x^2}\mathrm dx$$ The Cesàro mean is $$I_n=\frac1n\sum_{k=1}^{n} f(U_k) $$ I want to plot the scatter plot ...
4
votes
2answers
117 views

Evaluation problems with NDSolve using the fixed step ExplicitEuler-Method

Motivation I am using Mathematica to implement System Dynamics (SD) models, e.g. differential equation models as applied to management/economic problems following the "methodology" of Jay W. ...
0
votes
1answer
50 views

Simulation of LogNormal process for an asset pricing

I'm new to Mathematica programming, so forgive my rather unsophisticated question: I need to simulate 5000 "walks" of a process value (of a stock) that starts from its current value, at t0, and ends ...
3
votes
1answer
90 views

How to deal with Part in a function?

I need to iterate several functions such as {3 x[[1]]^2 + x[[2]], x[[2]], x[[3]]}, {Exp[x[[4]]], x[[2]], x[[3]], x[[4]]},etc. ...
0
votes
1answer
77 views

My simulation is not never finishing and it is taking so much time?

I am running simple code which involves calculation of two first order differential equations.It is taking so much time and i am unable to get the results as the simulation is never finishing. ...
2
votes
2answers
103 views

How to speed up a system simulation?

I need to simulate a series of nonlinear (and linear) with thousands of state variables. Here is a simple linear example ...
1
vote
1answer
66 views

How would I go about simulating conditional random birth 100 times?

So I have the following scenario: Assume you have this organism that reproduces by itself. An organism either reproduces 0, 1, 2, or 3 organisms at a time. Assume they're asexual and reproduce only ...
27
votes
1answer
308 views

Random polyhedra walk

I would like to recreate ssch's random polyhedra random walk, which he posted in the chat. For convenience here it is again: Since it's been one and a half year since then I've certainly had time ...
5
votes
3answers
1k views

How to define a distribution that 90% of the time gives me 0?

This maybe a simple question, but I am just stuck with it. I want to do some simulation, say with 0.9 probability, I get a 1, and 0.1 probability get a 0. How would I do that? Where should I start? ...
1
vote
2answers
99 views

Random walk using Module [closed]

I want to create a random walk using Module. The walk start at {0, 0}. At every step, x ...
6
votes
3answers
333 views

Simulate random data with correlation

I would like to simulate some random data e.g. between 0 and 1, but with a given correlation. In other words some data where the correlation between two datasets is e.g. a constant or within a give ...
0
votes
0answers
45 views

Simulation of the semicircle Wigner Theorem

Let's begin with some termes: For $1\le i<j<\infty$ let $X_{i,j}$ be independant and indentically distributed (i.i.d) real random variables with mean $0$ and variance $1$ and set ...
1
vote
1answer
59 views

Find maximum Log likelihood for repeated random variates

I have the following code ...
2
votes
0answers
92 views

Computational Bayesian analysis in Mathematica: Any plans to develop MCMC?

Does anyone know if there are any plans to develop an MCMC capability in Mathematica? My reasoning for asking is that as it stands, I can't seem to find any 'out-of-the-box' functions/capabilities ...
1
vote
0answers
118 views

Simulate a polygon bouncing with collision detection inside a circle/polygon

Simulate a polygon bouncing with collision detection inside a circle/polygon. the example can be see in help page by searching WhenEvent; ...
2
votes
0answers
133 views

How to control pedestrians to enter the simulation region with random functions?

I am working on simulating crowds of a cross-typed region, given that pedestrians entering from 4 gates of north, east, west and south, ...
0
votes
1answer
74 views

How can I use manipulate on multiple lists within a function?

So I have my N-Body Problem set up like so, and I can plot it in ListPointPlot3D, but I cannot figure out how to stick this into a manipulate function. ...
4
votes
1answer
227 views

Monte Carlo Volume Calculation and Speed Up

I am trying to do a Monte Carlo area calculation for an irregular area defined by: $$0 \le x \le 1, 10 \le y \le 13, y \ge 12 \cos(x), y \ge 10 + x^3$$ I used the code with modifications (so I can ...
0
votes
1answer
40 views

Repeating a Function [closed]

I have created a function transitions[x_] that takes in a value of x but the output is a different vector each time as I have used the RandomVariate function. I ...
0
votes
1answer
43 views

Simulating from Custom Function

I am going through an old research paper and I am stuck in one area of the coding. I'll spare you with most of the details but the function I want to simulate from is a complicated multivariate beta ...
-1
votes
1answer
111 views

Making animations with Mathematica [duplicate]

I want to export an animation for polar plot $r=\cos 2\theta$, instead of directly using Animate. But I want a table of snapshots: movie = ParallelTable[...] and a point that produce its animations ...
1
vote
0answers
143 views

Mathematica + System Modeler or Matlab + Simulink [closed]

I want to learn control systems(Using Ogata Modern Control Systems Book) and I am not sure in which should I invest : Matlab+Simulink+Control systems = aprox 220 euro Mathematica + Workbench + ...
1
vote
0answers
75 views

Creating an orrery

I am interested in creating an orrery, ideally with SystemModeler. I have been experimenting with the MultiBody library since that allows you to do animations. The most relevant example seems to be ...
1
vote
0answers
123 views

Finding the point of best focus for a ball lens

This is my project (simulation): A set of parallel rays goes trough a ball lens (circular lens). Because of spherical aberration, refracted rays will not meet in a single point. Find the distance ...
0
votes
1answer
72 views

WSMModelData Error

I am getting this error message when I run simulation in Mathematica that makes iterations to a SystemModeler model. ...
0
votes
0answers
90 views

How do I perform the following numerical integration

I have the following integral to evaluate numerically: $$x(t) = \frac{1}{f(t)}\int_0^{t_b} t^m (t + n)^o \sin(pt) \mathrm{d}t \quad m,n,o,p \in \mathbb{R}$$ ...
6
votes
1answer
359 views

Optimizing Monte Carlo simulation of a Pred-Prey model

My assignment and code As part of an assignment for one of my classes, I'm trying to run a "massive" Monte Carlo simulation in Parallel on the follow model: ...
1
vote
1answer
76 views

Stochastic Approximation and Simulation using Running Median

I have a function $$F(X_{t+1},Y_{t}^{med})= \alpha X_{t+1} + (1-\alpha) Y_{t}^{med},$$ where $$Y_{t}^{med} = Median(Y_1, Y_2,... Y_t).$$ Moreover, $Y_1 = X_1$ and $Y_t = F(X_{t},Y_{t-1}^{med})$ ...
0
votes
0answers
59 views

How to set the boundary fixed and apply the Young's modulus in Mathematica's FEM? [duplicate]

Provided the drawing .stl is given, and the Young's modulus is know, how to start a FEM vibration mode test in Mathematica? The boundary is required to be fixed and the interested focus is on the ...
5
votes
1answer
189 views

Simulation Sample Paths for Stochastic Approximation Algorithm

Let $X_t$ be IID random variables in $[0,1]$ and CDF $F(\cdot)$. Suppose there exists a variable $Y_t$ given by: $Y_1 = X_1$ and $Y_t = \phi(X_t, \overline{Y}_{t-1}), \forall t >1$, where ...
2
votes
0answers
68 views

Determining the total illumination of a polygon

Is it possible to determine the total illumination of a particular polygon with the given light sources? I truly acknowledge that Mathematica is not supposed to do this modeling, but it is what ...
0
votes
1answer
647 views

Test a wooden board's vibration mode

Here is a wooden board, with dimensions shown on the picture below. How we can use Mathematica's newly build-in finite element analysis features to show the different modes of its vibrations. Assuming ...
1
vote
1answer
140 views

Simulation Beta Distribution

Suppose a function such as: $\phi^{\alpha} (x,y) = \left\{ \begin{array}{l l} \alpha x & \quad \text{if $x < y$}\\ x & \quad \text{if $x = y$}\\ \alpha x + (1 -\alpha) & ...
1
vote
1answer
240 views

Potential hill simulation

I attempted to simulate the motion of a particle approaching to a potential hill. The particle should experience a force of -1/r^2, if the equation for the ...
3
votes
1answer
413 views

Circular membrane vibration simulation

I'm new in Mathematica and I'm trying to simulate the vibration of a circular membrane for math project but I don't even know how to start. The wave equation describes the displacement of the ...
7
votes
0answers
202 views

Partial Differential Equation in Parallel

is there any native way to implement multi-core parallel solving of PDE in Wolfram Mathematica? WM 10 now supports Finite Elements Method, but it is actually useless without parallelization. Usually ...
0
votes
0answers
263 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
729 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
84 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 ...
4
votes
1answer
194 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). ...
0
votes
0answers
33 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
2answers
137 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 ...
2
votes
1answer
110 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 ...
3
votes
1answer
126 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: ...
5
votes
3answers
254 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: ...
3
votes
1answer
60 views

RandomVariate does not evaluate a Hyperbolic Distribution

Any Idea why I can't get a result from this expression: ...
0
votes
1answer
213 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 ...
1
vote
1answer
74 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 ...
1
vote
1answer
140 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
162 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 ...