how would I create a 6x6 matrix with evenly distributed values from -10 to 10?
Afficher commentaires plus anciens
I know a long way, by typing out the exact values, I was just curious as to if there was a more efficient way.
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 13 Fév 2016
randi([-10,10],6,6)
If you want integer values.
rand(6,6)*20-10
if you want continuous values
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!