generate uniform random numbers between -1 and +1 in matlab
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sajid Sarwar
il 14 Dic 2019
Commentato: Image Analyst
il 14 Dic 2019
how o generate uniform random numbers between -1 and +1 in matlab?
0 Commenti
Risposta accettata
David Hill
il 14 Dic 2019
2*rand()-1;
2 Commenti
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.
Più risposte (0)
Vedere anche
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!