MATLAB Query !!!!!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

MATLAB Query !!!!!!

How can I able to make different combinations of the set { 1 2 3 4 } where any one digit from the set can repeat more than one time in that particular combination using MATLAB inbuilt function OR I should make my own algorithm for this ?????? Example : 1. Input : { 1 2 3 4 } 2. Output : 1 1 1 1 1 1 1 2 1 1 1 3 1 1 1 4 1 1 2 3 1 1 3 4 1 1 2 4 1 2 3 4 and so..

3rd May 2018, 8:38 AM
Rakesh Patil
Rakesh Patil - avatar
1 Answer
0
Hey, if you want to do permutations you have to do this: for example: v=[1 2 3 4]; P= perms (v) Lucky in your project 💪
4th May 2018, 12:27 AM
Carlos Bustillo
Carlos Bustillo - avatar