global s_lname TLEN

practicesetupparams



prompts = {'Subject Number', 'Last Name', 'First Name', 'Age', 'Sex (M/F)', 'Handedness (R/L)'};
default_s_info = {'0', '', '', '', '', ''};
s_info = inputdlg(prompts, 'Subject Info', 1, default_s_info);
[s_num, s_lname, s_fname, s_age, s_sex, s_hand] = deal(s_info{:});
s_num = sscanf(s_num, '%d');
s_age = sscanf(s_age, '%d');

if (s_num > 0)
	subjfile = fopen('subjects_newdualstream.txt', 'a');
	fprintf(subjfile, '%i  %s %s  %i  %s  %s\n', ...
	s_num, s_fname, s_lname, s_age, s_sex, s_hand);
	fclose(subjfile);
end;





% DISPLAY INSTRUCTIONS


a = fopen('instructions.txt','r');
instructions = fscanf (a,'%c');

msg = msgbox(instructions, 'modal');
uiwait(msg);

instructions = ['Let us begin with some practice trials   ' ...
sprintf('\n\n')];
msg = msgbox(instructions, 'modal');
uiwait(msg);

hidecursor
practicesetupparams
runexp(0)
showcursor



 instructions1 = ['You will now begin the experiment, which will take approximately 25 minutes.' ...
 sprintf('\n\n')];
 msg = msgbox(instructions1, 'modal');
 uiwait(msg);
 
hidecursor
 setupparams
 
runexp(1)
showcursor

 
 instructions1 = ['Halfway done, time for a quick break. Press Ok to Continue ' ...
 sprintf('\n\n')];
 msg = msgbox(instructions1, 'modal');
 uiwait(msg);
 
 
 setupparams
 
runexp(2)


 
 instructions1 = ['Thank you for your participation, Go tell Rijuta you are done. ' ...
 sprintf('\n\n')];
 msg = msgbox(instructions1, 'modal');
 uiwait(msg);
 
 
 

 
