How to save all trials in Matlab

1 Ansicht (letzte 30 Tage)
M
M am 12 Jun. 2014
Kommentiert: M am 12 Jun. 2014
Hello,
The goal is to make a code in which all responses are being saved.
This is the code so far, but it only saves the last response. Anyone know how to save all responses?
for k = 1 : ntrials; fixationcross(w,fixvhdim,linewidth,screenrect); Screen('Flip', w); WaitSec(ISI); filenumber = randomOrder1(k); fullFileName = fullfile(pwd, baseFileNames1{filenumber}); img = imread(fullFileName); Screen('PutImage', w, img); Screen('Flip', w); WaitSecs(0.002);
filenumber = randomOrder2(k);
fullFileName = fullfile(pwd, baseFileNames2{filenumber});
img = imread(fullFileName);
Screen('PutImage', w, img);
Screen('Flip', w);
getaresponse;
counterclockresponse(ntrials) = getaresponse;
end

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 12 Jun. 2014
M, use instead
counterclockresponse(k) = getaresponse;

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by