How do I make a random vector with intergers?

9 vues (au cours des 30 derniers jours)
James Pain
James Pain le 17 Mar 2017
Commenté : James Pain le 17 Mar 2017
Hello, I was wondering how I could make a random 3 dimensional vector in Matlab with each value being an integer between -9 to 9?

Réponse acceptée

Matt J
Matt J le 17 Mar 2017
randi([-9,9],3,1)
  1 commentaire
James Pain
James Pain le 17 Mar 2017
Thanks, that's exactly what I wanted

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by