Random numbers with custom distrbution

myRand returns random numbers with a custom distribution specified as a histogram.
0 Descargas
Actualizado 4 sep 2024

Ver licencia

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.

Citar como

William Rose (2024). Random numbers with custom distrbution (https://www.mathworks.com/matlabcentral/fileexchange/171874-random-numbers-with-custom-distrbution), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2024a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
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