- #1
electroissues
- 7
- 0
Homework Statement
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.
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!