changing similar numbers in a raw
1 回表示 (過去 30 日間)
古いコメントを表示
Dear all,
I have a raw with repeated numbers. I want to change them to different onse exactly like the randperm.
X=[1 2 2 2 3 2 4 2 2 2];
i want to make it
X=[1 2 4 3 7 5 8 6 10 9];
many thanks
1 件のコメント
KALYAN ACHARJYA
2022 年 4 月 3 日
編集済み: KALYAN ACHARJYA
2022 年 4 月 3 日
X=[1 2 2 2 3 2 4 2 2 2];
Desired result? Any issue?
X=randperm(length(X))
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!