Generating random angles between interval
조회 수: 9 (최근 30일)
이전 댓글 표시
How would I generate three random angles between (-pi to pi)?
ex) q= [theta1 theta2 theta3], all theta are random numbers between -pi to pi
댓글 수: 0
답변 (1개)
Star Strider
2022년 11월 2일
Try something like this —
random_angles3 = rand(1,3)*2*pi - pi
random_angles1000 = rand(1,1000)*2*pi - pi;
figure
histogram(random_angles1000, 25)
.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!