【发布时间】:2014-09-22 13:58:35
【问题描述】:
我目前正在尝试使用以下代码在 matlab 中洗牌 1 x N cell 数组的内容:
shuffledframes = frames{randperm(NumberOfFrames)};
frames=shuffledframes;
%printing cell array contents
for i=1:NumberOfFrames
frames(i)
end
但是框架内容似乎并没有变...
代码中是否有我看不到的错误?
【问题讨论】:
-
只是一个旁注,而不是你用来显示所有值的循环,你也可以使用:
frames{:}