Random numbers with custom distrbution
Versione 1.0.2 (5,43 KB) da
William Rose
myRand returns random numbers with a custom distribution specified as a histogram.
myRand() returns random numbers with a custom distribution, where the distribution is specified like a histogram. It is useful if you want to reproduce a distribution that is not one of the built-in, named distributions. For example, to reproduce the distribution of an experimentally measured variable, use Matlab's histcounts() to estimate the distribution, then use myRand() to generate random numbers with the same distribution. This is useful for Monte Carlo simulations and other statistical testing.
Cita come
William Rose (2024). Random numbers with custom distrbution (https://www.mathworks.com/matlabcentral/fileexchange/171874-random-numbers-with-custom-distrbution), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2024a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxTag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.2 | Fixing upload error on v.1.0.1. |
||
1.0.1 | A sample data file has been added to show how myRand() can generate random numbers with the same distribution as measured data. The test script, myRandTest.m, has been updated to demonstrate how to do it. myrand() itself is unchanged. |
||
1.0.0 |