【发布时间】:2016-09-19 09:04:12
【问题描述】:
我正在尝试交换行向量内的 2 个行向量。
例如:
a=[1 2 3];
b=[5 3];
c=[9 3 7 6];
d=[7 5];
X1= [ a, b , d, c ];
我想进行随机交换,使得 a、b、c、d 中的两个保持在 X1 中的相同位置,其余两个在 X1 中随机排列。例如,一些可能的随机交换是:
[b,a,d,c] % a and b swap with each other whereas d and c remain at the same place
[d,b,a,c] % a and d swap with each other whereas b and c remain at the same place
[c,b,d,a] % a and c swap with each other whereas b and d remain at the same place
......
.....
【问题讨论】:
-
请查看URL这将有助于提升您的内容质量
-
我不知道你在问什么