How to create random numbers from -pi to pi?

2 件のコメント

Stephen23
Stephen23 2015 年 7 月 20 日
編集済み: Stephen23 2015 年 7 月 20 日
What probability distribution do you want the values to have?
Mayank Lakhani
Mayank Lakhani 2015 年 7 月 20 日
I want uniform distribution. thanks for your reply

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2015 年 7 月 20 日

0 投票

(rand() * 2 - 1) * pi

1 件のコメント

Walter Roberson
Walter Roberson 2015 年 7 月 20 日
(rand(1,100) * 2 - 1) * pi

サインインしてコメントする。

その他の回答 (1 件)

Mayank Lakhani
Mayank Lakhani 2015 年 7 月 20 日

0 投票

i want like (1,100) matrix. When i tries this shows error

カテゴリ

ヘルプ センター および File Exchange で MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by