Info
此问题已关闭。 请重新打开它进行编辑或回答。
Random vector non repeated otherwise create new vector
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have number list from 1 to 5. We know there are 120 different permutation for these. I want to write a rule that for my algorithm, I want to create a permutation that does not creaated before. For example,
1 2 3 4 5 first
2 3 4 5 1 second
...
2 3 4 5 1 nth it shouldn't be created. It is already in the second iteration.
So, by this manner creations should end at most 120th trial.
Can you help me solve this? I'm using randperm
Thank you.
回答(2 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!