how to distribute users non uniformly random inside rectangle

조회 수: 5 (최근 30일)
Ahmad Hani
Ahmad Hani 2017년 5월 19일
댓글: Ahmad Hani 2017년 5월 20일
I have a rectangle in xy plane eg. R=50 , how can I distribute users inside the rectangle in a non uniform distribution (any non uniform dist) and after that how can I find the xy coordination of each user inside the rectangle. thanks
Users points in xy plane every user has its random coordination (x,y) inside the rectangle Uniformly distributed random
Thanks to KSSV's Badges he give the answer to this question but for Uniformly distributed random users see this link:
https://www.mathworks.com/matlabcentral/answers/340923-how-to-distribute-users-uniformaly-inside-rectangle#answer_267600
KSSV's Badges profile https://www.mathworks.com/matlabcentral/profile/authors/2038981-kssv

채택된 답변

Walter Roberson
Walter Roberson 2017년 5월 20일
You can use the same code as KSSV showed, but replace rand() with betarnd()
  댓글 수: 3
Walter Roberson
Walter Roberson 2017년 5월 20일
xy = 60 * betarnd(0.75,1,1000,2);
scatter(xy(:,1), xy(:,2));
Ahmad Hani
Ahmad Hani 2017년 5월 20일
Thank Walter Roberson
its work

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by