Matlab:混合输入向量

Matlab:混合输入向量,matlab,vector,Matlab,Vector,嘿,那里, 有没有办法在matlab中随机“混合”输入向量元素的顺序?说我输入 [1:5]' 我想出去,例如: [3 5 1 2 4]' 谢谢 使用: 使用: shuffledOutput = inputVector(randperm(length(inputVector)));

嘿,那里, 有没有办法在matlab中随机“混合”输入向量元素的顺序?说我输入

[1:5]'

我想出去,例如:

[3 5 1 2 4]'

谢谢

使用:

使用:

shuffledOutput = inputVector(randperm(length(inputVector)));