MATLAB code to Generate Raleigh Random Variable

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 9K views
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
 
Physics news on Phys.org
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