How to build a number generator allowing to get any desirable signal distribution?
1 view (last 30 days)
Show older comments
Hello all!
I am new here and new at using MATLAB too. I hope that someone of you will be able to help me out.
I am dealing with the wave directional spreading and I am trying to consider the influence of the random phase. Thus,I need to create a "random" number generator allowing to get any desired distribution. I know it doesn't sound logic as the number generated in this way is no random any more but that's what is needed for this case. Can anyone help me and give any tips?
Thank you very much in advance!
0 Comments
Answers (1)
dpb
on 27 Jun 2014
Basically, you have to have the inverse distribution function and then it's "trivial"...
The Matlab Statitistics Toolbox has builtin rng's for a large number of distributions; you may want to check there before "rolling your own"...
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!