matlab - geometric random graph in a circle -


i wanted generate set of coordinates distributed uniformly @ random within ball of radius r. there way in matlab without loops, in matrix-like form?

thanks

update: i'm sorry confusion. need generate n points uniformly @ random on circle of radius r, not sphere.

the correct answer here http://mathworld.wolfram.com/diskpointpicking.html. distribution known "disk point picking"


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -