Professional Documents
Culture Documents
MATLAB Answers
Follow
294 views (last 30 days)
Sign in to comment.
Answers (4)
https://www.mathworks.com/matlabcentral/answers/40847-generate-random-numbers-with-custom-pdf 1/4
21/6/2020 Generate random numbers with custom PDF - MATLAB Answers - MATLAB Central
• Link
If you have the Statistics Toolbox, then take a look at the beta distribution. Use it with disttool to see how the parameters affect the
distribution, randtool to see what a random sample from this distribution looks like, and betarnd to generate your own sample from
the command line or inside a function.
0 Comments
Sign in to comment.
• Link
You may consider using this PDFSampler. I believe, it does exactly what you need. You just need to specify how you want your
samples to be distributed, e.g. you may provide their histogram.
0 Comments
Sign in to comment.
• Link
https://www.mathworks.com/matlabcentral/answers/40847-generate-random-numbers-with-custom-pdf 2/4
21/6/2020 Generate random numbers with custom PDF - MATLAB Answers - MATLAB Central
Sign in to comment.
• Link
Sign in to comment.
See Also
MATLAB Answers
2 Answers
4 Answers
3 Answers
Entire Website
Blogs
Documentation
Blogs
Tags
rand probability pdf distribution
https://www.mathworks.com/matlabcentral/answers/40847-generate-random-numbers-with-custom-pdf 3/4
21/6/2020 Generate random numbers with custom PDF - MATLAB Answers - MATLAB Central
mathworks.com
© 1994-2020 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of
additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.
https://www.mathworks.com/matlabcentral/answers/40847-generate-random-numbers-with-custom-pdf 4/4