4.9 打乱次序
有数据如下:
1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 |
脚本:
A | |
---|---|
1 | =file(“Book1.xlsx”).xlsimport@w() |
2 | =A1.conj().sort(rand()).group(#%5) |
3 | =A1.(~.sort(rand())) |
4 | =transpose(A1).(~.sort(rand())) |
5 | =transpose(A9) |
A2 整片打乱次序
A3 行内打乱次序
A4 先转置再执行行内打乱次序
A5 转置回原样,从而实现列内打乱次序的效果
运行结果:
A2:
A3:
A5: