(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Given 2 independent uniform random variables X,Y = U [0,1], consider the random variables Z = g (X,Y) for g = (x,y) = sqrt (-2ln(x) . cos(2piy). Since finding the distribution of g(X,Y) analytically is quite tough, I need to generate MATLAB program for

1 - 10,000 uniformly distributed random samples for X and Y

2 - For each sample of X and Y, compute Z= g(X,Y)

3 - Draw a histogram over the resulting samples in Z

4 - Estimate the moments mZ for n = 1,2....6.

3. The attempt at a solution

I tried for the first solution and I'm hopelessly stuck. MATLAB gives me an error saying "Attempted to access (0,1); index must be a positive integer or logical."

I don't understand where I'm going wrong.

Please help!

**Physics Forums - The Fusion of Science and Community**

# MATLAB for uniform random variables

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

Have something to add?

- Similar discussions for: MATLAB for uniform random variables

Loading...

**Physics Forums - The Fusion of Science and Community**