MATLAB code to Generate Raleigh Random Variable

3 replies · 10K views · last reply
neeraj.patel1
Messages
3
Reaction score
0
What is the Matlab code for generating 100,000 Raleigh Random Variable with sigma^2=2 using rand command only. Generate histogram and normalize it by dividing 1,00,000 times the bin width
 
MATLAB code to find ratio of pair of uniform RV

Homework Statement



Generate 100000 pairs of Uniform RV. Find ratio of each pair of RV.Plot histogram and compare to standard Cauchy density.

Homework Equations



rand()
box muller
cauchy=1/pi*(1+x^2)
hist()

The Attempt at a Solution



use box muller to generate rv