Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function res = randnum()
- % Generates a number from a uniform distribution in the interval -pi:pi
- res = 2*pi*rand(1,1,'double') - pi;
- if res == pi
- res = randnum();
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement