Monte-Carlo Simulator

Monte-Carlo simulator for statistical process simulation
852 Downloads
Updated 12 Apr 2016

View License

"MonteCarloSimulator" is an object dedicated to the simulation of random phenomena on the basis of random variables generators and functions describing the simulated statistical process. Thus, the random variables and the numerical functions defined by user are updated for each of the simulation steps through the arithmetic expressions defined in anonymous functions. The reference to the previous values of a function is possible through the definition of buffers storing its last values.
Any function can refer to the variables, function buffers or previously defined functions by defining them as input arguments of its anonymous function. These input arguments must be defined in a specific order:
1) Other functions
2) Function buffers
3) Random variables
Then, for each of the simulation steps, all the arguments from the list above are extracted and injected in the arithmetic expression of the anonymous function corresponding to the function to evaluate. The simulation is performed for a specified number of realizations with the display of the estimated time remaining thanks to a timer wait bar.

The source folder includes the following examples:
- Buffon’s needle (short needle case)
- Gyroscope random walk (integration of angle increments with white noise)
- Filtering integrator (two meaning average masks)
- German tank problem (test of an estimator)
- Bi-dimensional random walk

The internal timer wait bar and the video recorder sources are enable at the following addresses:
http://fr.mathworks.com/matlabcentral/fileexchange/55985-timer-waitbar
http://fr.mathworks.com/matlabcentral/fileexchange/56100-video-recorder

Video demonstration links:
https://www.youtube.com/watch?v=OzltBUGGCUE&ab_channel=Pseudonymeoriginal
https://www.youtube.com/watch?v=-tMRpWT4jl8&ab_channel=Pseudonymeoriginal
https://www.youtube.com/watch?v=HApwGe7YqwM&ab_channel=Pseudonymeoriginal
https://www.youtube.com/watch?v=68tiLGV865c&ab_channel=Pseudonymeoriginal

Cite As

Eric Ogier (2024). Monte-Carlo Simulator (https://www.mathworks.com/matlabcentral/fileexchange/56509-monte-carlo-simulator), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0