Cody

Problem 44272. Generate one sample of uniform random numbers between -pi and +pi

Solution 1244078

Submitted on 2 Aug 2017 by AMITAVA BISWAS
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
w=0; for k=1:10^6 w=w+rndpi(1); end assert(w<1000)

2   Pass
w=0; for k=1:10^6 w=w+rndpi(1)^2; end assert(w>10^5)

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!