Hello,
I wrote this script :
SsID = input ('Numero participant: ','s');
[w, wrect]=Screen('OpenWindow', 0);
[width, height]=Screen('WindowSize', w);
items = {'lapin', 'souris', 'voiture', 'saumon', 'vélo', 'table', 'cochon'};
Order=items(randi(length(items)):end)
for i = Order
Screen(w, 'TextFont', 'Calibri')
Screen(w, 'TextSize', 50)
DrawFormattedText(w, items, 'center', 'center', [54,54,54])
Screen(w, 'Flip')
WaitSecs(2)
end
Screen('CloseAll');
DrawFormettedText functions if I don't use the command 'items(randi(length(items)):end)'
But with this one, I have this error message :
??? Error using ==> strfind
Input strings must have one row.
Error in ==> DrawFormattedText at 136
newlinepos = strfind(char(tstring), '\n');
Error in ==> EssaiRandint at 19
DrawFormattedText(w, items, 'center', 'center', [54,54,54])
I have looked at forums, DrawFormetedTextdemo, etc, but without succes.
I dont understand the error, and that would be very nice if somebody can help me.
I wrote this script :
SsID = input ('Numero participant: ','s');
[w, wrect]=Screen('OpenWindow', 0);
[width, height]=Screen('WindowSize', w);
items = {'lapin', 'souris', 'voiture', 'saumon', 'vélo', 'table', 'cochon'};
Order=items(randi(length(items)):end)
for i = Order
Screen(w, 'TextFont', 'Calibri')
Screen(w, 'TextSize', 50)
DrawFormattedText(w, items, 'center', 'center', [54,54,54])
Screen(w, 'Flip')
WaitSecs(2)
end
Screen('CloseAll');
DrawFormettedText functions if I don't use the command 'items(randi(length(items)):end)'
But with this one, I have this error message :
??? Error using ==> strfind
Input strings must have one row.
Error in ==> DrawFormattedText at 136
newlinepos = strfind(char(tstring), '\n');
Error in ==> EssaiRandint at 19
DrawFormattedText(w, items, 'center', 'center', [54,54,54])
I have looked at forums, DrawFormetedTextdemo, etc, but without succes.
I dont understand the error, and that would be very nice if somebody can help me.