How to build a number generator allowing to get any desirable signal distribution?

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!

Answers (1)

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"...

1 Comment

Correct me if I am not right, but applying the inverse fourier wouldn't I get the phase values random? As I am very new at this I am reading literature and there it is written that by doing inverse fourier we can get random phases, whereas I need to come up with an idea how to make phases correlated. My appologies if I am talking complete nonsense.

Sign in to comment.

Categories

Find more on Random Number Generation in Help Center and File Exchange

Asked:

on 27 Jun 2014

Commented:

on 3 Jul 2014

Community Treasure Hunt

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

Start Hunting!