generate uniform random numbers between -1 and +1 in matlab
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sajid Sarwar
le 14 Déc 2019
Commenté : Image Analyst
le 14 Déc 2019
how o generate uniform random numbers between -1 and +1 in matlab?
0 commentaires
Réponse acceptée
David Hill
le 14 Déc 2019
2*rand()-1;
2 commentaires
Image Analyst
le 14 Déc 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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Random Number Generation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!