creating random number from -pi to pi

1 visualizzazione (ultimi 30 giorni)
How to create random numbers from -pi to pi?
  2 Commenti
Stephen23
Stephen23 il 20 Lug 2015
Modificato: Stephen23 il 20 Lug 2015
What probability distribution do you want the values to have?
Mayank Lakhani
Mayank Lakhani il 20 Lug 2015
I want uniform distribution. thanks for your reply

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 20 Lug 2015
(rand() * 2 - 1) * pi

Più risposte (1)

Mayank Lakhani
Mayank Lakhani il 20 Lug 2015
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