Marco83
Mechanical
- Jun 21, 2006
- 8
The question is about the Rayleigh random distribution.
If I use the command v=b^2*raylpdf(x,b) with x=[0:0.1:1000]
and b=249 I obtain a maxwellian distribution for the velocity v.
If now I want to do the same thing with the random generator raylrnd using the command v(i)=b^2*raylrnd(b) into a for cycle I obtain a distribution that has the correct shape but the values of v are totaly screwed up. If I omit the b^2 I obtain almost the correct values, but looking at matlab documentation I should include b^2. Is this a bug or am I missing something?
Thanks
If I use the command v=b^2*raylpdf(x,b) with x=[0:0.1:1000]
and b=249 I obtain a maxwellian distribution for the velocity v.
If now I want to do the same thing with the random generator raylrnd using the command v(i)=b^2*raylrnd(b) into a for cycle I obtain a distribution that has the correct shape but the values of v are totaly screwed up. If I omit the b^2 I obtain almost the correct values, but looking at matlab documentation I should include b^2. Is this a bug or am I missing something?
Thanks