Limiting an integer in a random matrix

1 view (last 30 days)
Aj
Aj on 29 Jan 2014
Commented: José-Luis on 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

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!