Limiting an integer in a random matrix

1 次查看(过去 30 天)
Aj
Aj 2014-1-29
评论: José-Luis 2014-1-29
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by