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))
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Power and Energy Systems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!