how to create random combination?

9 views (last 30 days)
Abdul
Abdul on 23 Feb 2014
Answered: Azzi Abdelmalek on 23 Feb 2014
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 Comment
the cyclist
the cyclist on 23 Feb 2014
You haven't been clear or complete enough in your description. I can't guess what you want. Please add more details.

Sign in to comment.

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 23 Feb 2014
repmat(randperm(3),1,7)

Categories

Find more on Random Number Generation 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!