Random secuence {-3,-1,1,3}

Hi All, how can I build a random secuence to obtain this values {-3,-1,1,3}?

Réponses (1)

Rick Rosson
Rick Rosson le 22 Oct 2014
Modifié(e) : Rick Rosson le 22 Oct 2014

0 votes

x = 2*randi([0 3],100,1) - 3;

Catégories

En savoir plus sur Random Number Generation dans Centre d'aide et File Exchange

Tags

Question posée :

le 22 Oct 2014

Modifié(e) :

le 22 Oct 2014

Community Treasure Hunt

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

Start Hunting!

Translated by