How to save all trials in Matlab

조회 수: 1 (최근 30일)
M
M 2014년 6월 12일
댓글: M 2014년 6월 12일
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

채택된 답변

Mischa Kim
Mischa Kim 2014년 6월 12일
M, use instead
counterclockresponse(k) = getaresponse;
  댓글 수: 1
M
M 2014년 6월 12일
Thanks a lot, this works!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by