Generating random angles between interval
7 ビュー (過去 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!