creating random number from -pi to pi

조회 수: 2 (최근 30일)
Mayank Lakhani
Mayank Lakhani 2015년 7월 20일
댓글: Walter Roberson 2015년 7월 20일
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일
(rand() * 2 - 1) * pi

추가 답변 (1개)

Mayank Lakhani
Mayank Lakhani 2015년 7월 20일
i want like (1,100) matrix. When i tries this shows error

태그

Community Treasure Hunt

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

Start Hunting!

Translated by