Contents
VARIABLE DECLARATIONS
global COND;
global cogent;
datadir = '~/Desktop/ICN_demos/';
ntrials = 120;
ISI = 1500;
EXPERIMENTAL SETUP
name = upper(input('Subject initials: ','s'));
COND = input('Condition code (1-4): ');
fprintf('\n read name=%s and cond =%g \n\n',name,COND)
while (~ismember(COND,1:4))
COND = input('Error! Please enter a condition code (1-4): ');
end
Error using ==> input
Cannot call INPUT from EVALC.
open input and output files
log_file = strcat(name, '_log.txt');
results_file = strcat(name, '_cond_', num2str(COND, '_res.txt');
fid_log = fopen(log_file, 'a');
fid_results = fopen(results_file,'a');
fprintf(fid_results,'name: %s condition: %1.0f\n',name,COND);
fprintf(fid_log,'name: %s condition: %1.0f\n',name,COND);