Limiting an integer in a random matrix

1 vue (au cours des 30 derniers jours)
Aj
Aj le 29 Jan 2014
Commenté : José-Luis le 29 Jan 2014
Hi, I want to make a 10 x 10 matrix with values either 1 or 2 but i only want 17 "2's" randomly placed together in 5 separate groups and the rest of the matrix to be "1's".
I was wondering how I should approach this.
thanks
  2 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 29 Jan 2014
placed together : what does that mean?
José-Luis
José-Luis le 29 Jan 2014
Sounds like homework

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices 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