Plotting random points on a circle
이전 댓글 표시
I am trying to plot 50 random points on a circle with a radius of 500 then store the x, y coordinates of the points in a matrix and calculate each point's distance from the centre of the circle (0,0), any reference I could use or how I can achieve this?
채택된 답변
추가 답변 (1개)
David Hill
2020년 5월 5일
a=2*pi*rand(1,50);
b=500*rand(1,50);
m=[b.*sin(a);b.*cos(a)];
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!