Limiting an integer in a random matrix

1 visualizzazione (ultimi 30 giorni)
Aj
Aj il 29 Gen 2014
Commentato: José-Luis il 29 Gen 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 Commenti
Azzi Abdelmalek
Azzi Abdelmalek il 29 Gen 2014
placed together : what does that mean?
José-Luis
José-Luis il 29 Gen 2014
Sounds like homework

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by