MATLAB: How to change the arrangement of numbers

loop

If I have a number 1193, how do I get 3119, 9311, 1931 and so forth after each loop?

Best Answer

str = '1193' ;
idx = perms(1:4) ;
iwant = str(idx)
You can use str2double to get them into numbers.