Random numbers with custom distrbution

myRand returns random numbers with a custom distribution specified as a histogram.
0 download
Aggiornato 4 set 2024

Visualizza la licenza

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 Linux

Community Treasure Hunt

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

Start Hunting!
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