Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Sajid Sarwar
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?

Réponse acceptée

David Hill
David Hill le 14 Déc 2019
  2 commentaires
Sajid Sarwar
Sajid Sarwar le 14 Déc 2019
I need a random array between -1 & 1
Image Analyst
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.

Connectez-vous pour commenter.

Plus de réponses (0)

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!

Translated by