RSVP : REPLACE LETTERS WITH DIGITS
显示 更早的评论
% CONDITION 1 = RSVP OF 13-21 LETTERS RANDOMLY WITHOUT REPLACEMENT
% CONDITION 2 = 2 OF THE LETTERS WERE REPLACED WITH DIGITS, RANDOMLY DRAWN
% CONDITION 3 = T2 IS PRESENTED 3 TO 6 TEMPORAL POSITIONS FROM THE END
% CONDITION 4 = T1 AND T2 VARIED FROM 1:5 ITEMS
I am trying to run psychtoolbox for my RSVP experiment. can someone please help me to program (replace) letter stream with T2 and T1 as required in condition 3 and condition 4.
s = ['A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'J' 'K' 'L' 'M' 'N' 'P' 'R' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'];
str=datasample(s,1,'Replace', false);
nletters = [13:21];
ntrial = datasample(nletters,1);
T1 = randi([2,9], black);
T2 = randi([2,9], black);
l2 = datasample(nletter);
for index = 1:ntrial
str=datasample(s,1,'Replace', false)
T1 = strrep(s,
T2 = strrep(s,
end
2 个评论
Guillaume
2019-10-22
Your question is not clear. What's T1, what's T2, what does "T1 AND T2 VARIED FROM 1:5 ITEMS" mean? Please provide an example of what you want.
The code you've written doesn't make much sense, you're using some functions incorrectly and you're using undefined variables such as black and nletter.
Note that:
s = ['A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'J' 'K' 'L' 'M' 'N' 'P' 'R' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'];
is exactly the same as the much simpler:
s = 'ABCDEFGHIJKLMNOPQRSTUVXYZ';
and could be generated with the even simpler:
s = 'A':'Z';
Migmar Tsering
2019-10-22
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Installation and Operational Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!