Limiting an integer in a random matrix

1 visualización (últimos 30 días)
Aj
Aj el 29 de En. de 2014
Comentada: José-Luis el 29 de En. de 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 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 29 de En. de 2014
placed together : what does that mean?
José-Luis
José-Luis el 29 de En. de 2014
Sounds like homework

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by