How to create random numbers from -pi to pi?

2 commentaires

Stephen23
Stephen23 le 20 Juil 2015
Modifié(e) : Stephen23 le 20 Juil 2015
What probability distribution do you want the values to have?
Mayank Lakhani
Mayank Lakhani le 20 Juil 2015
I want uniform distribution. thanks for your reply

Connectez-vous pour commenter.

 Réponse acceptée

Walter Roberson
Walter Roberson le 20 Juil 2015
(rand() * 2 - 1) * pi

Plus de réponses (1)

Mayank Lakhani
Mayank Lakhani le 20 Juil 2015

0 votes

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

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by