MATLAB Answers

How to create all possible outcome of a set amount of variables?

1 view (last 30 days) on 12 Sep 2020
Commented: on 12 Sep 2020
So i have 3 numbers from 1-3. How would i create a matrix of all the possible outcome without repeating the number in each matrix.
such as
Then display how many different combination there was.
The example i provided there are 4 rows total.


Sign in to comment.

Accepted Answer

More Answers (0)

Community Treasure Hunt

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

Start Hunting!