Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何让 matlab 再次使用数字?
我有 10 次试验,但只有 8 个数字,我想告诉 matlab 以随机顺序重复这些数字。我怎样才能做到这一点?
数字 = {0 1 2 3 4 5 6 7 8};
Psychtoolbox 函数 RandSel 可用于:
numbers = 1:8; trialNumbers = RandSel(numbers, 10);
请注意,由于选择是随机的,在给定的 10 次试验中,给定的数字可能会重复多次或根本不使用。