Azzera filtri
Azzera filtri

generate uniform random numbers between -1 and +1 in matlab

1 visualizzazione (ultimi 30 giorni)
how o generate uniform random numbers between -1 and +1 in matlab?

Risposta accettata

David Hill
David Hill il 14 Dic 2019
2*rand()-1;
  2 Commenti
Image Analyst
Image Analyst il 14 Dic 2019
Did youi look at the help for rand()? It answers both your original question and this follow up question
randomMatrix = 2 * rand(rows, columns) - 1;
where you set rows and columns to whatever values you want.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Random Number Generation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by