Putting specific values to a matrix

1 visualizzazione (ultimi 30 giorni)
Swati Sarangi
Swati Sarangi il 26 Nov 2020
Commentato: Swati Sarangi il 27 Nov 2020
Hi ,
I'm having following problem. I have 3 numberx 1,2,3
I've to form a matrix with entries with all possible of numbers using all digits only once.
Thanks.

Risposte (1)

Walter Roberson
Walter Roberson il 26 Nov 2020
values = [1 2 3];
perms(values)
ans = 6×3
3 2 1 3 1 2 2 3 1 2 1 3 1 3 2 1 2 3
  1 Commento
Swati Sarangi
Swati Sarangi il 27 Nov 2020
Thanks for responding but my question is little different. I've to get all possible combinations with repeated values too like 111 112 113 121 122 123 etc. Whatever you've given are just limited values out of many possible combinations ; 27 combinations in total.

Accedi per commentare.

Categorie

Scopri di più su Elementary Math in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by