Skip to content

A repository providing simple techniques and examples of generating random numbers from specified distributions.

Notifications You must be signed in to change notification settings

hjstobart/matlab-random-numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview:

Various different techniques and examples for generating random numbers from specific distriubtions on MATLAB.

Contents:

  • Acceptance Rejection method
  • Box-Muller method (Normally distributed)
  • Fibonacci method
  • Marsaglia method (Normally distributed)
  • Linear Congruential Generator

Note:

Dear reader,

One topic that has come up time and time again during my learning is generating specific random numbers. It is a useful technique to understand how computers go about generating the random numbers they do, be that on MATLAB, Python, or even MS Excel. That being said, however, it strongly recommended that you do not implement your own random number generator in your work unless the task explicitly asks for it. Instead you should always look to use the in-built functions as they will be far more robust and, in general, create a much longer non-repeating sequence. Truly random numbers cannot be generated computationally (yet) and as such the majority of methods rely on a seed number.

The scripts may not be perfect, but I hope these give you some insight.

H ✌️


Terms & Conditions

Disclaimer:

This repository and the code therein may be freely copied and distributed as necessary. It is being provided solely for information and general illustrative purposes. The author will not be responsible for the consequences of reliance upon the code or for numbers produced from using the code.

End User Terms of Service:

Where appropriate, this repository is in compliance with Section C. Acceptable Use and Section D. User-Generated Content of the GitHub Terms of Service. For more information, please see here: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service

About

A repository providing simple techniques and examples of generating random numbers from specified distributions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages