how to create random combination?

9 次查看(过去 30 天)
Abdul
Abdul 2014-2-23
How to create random combination of three integer of length 21. for example ans=1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 and next time answer should be in random order.
  1 个评论
the cyclist
the cyclist 2014-2-23
You haven't been clear or complete enough in your description. I can't guess what you want. Please add more details.

请先登录,再进行评论。

回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2014-2-23
repmat(randperm(3),1,7)

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by