Code covered by the BSD License  

Highlights from
Edinburgh Handedness Inventory Data Collection Form

image thumbnail

Edinburgh Handedness Inventory Data Collection Form

by

 

GUI form to collect responses on the Edinburgh Handedness Inventory (Oldfield, 1971).

EHISave(fileName, SubID, Gender, Age, ScoreFor10, ScoreFor12, EHILineScores)
function Err = EHISave(fileName, SubID, Gender, Age, ScoreFor10, ScoreFor12, EHILineScores)
% EHISave: Save collected EHI data to file FileName; return 0 if successful.

Err = 0;  % NEWJEFF: Error code never set.

if exist(fileName, 'file')  % check whether the file already exists
   thismode = 'a';   % append to existing file
else
   thismode = 'wt';  % write new file
end
FileID=fopen(fileName, thismode);

fprintf(FileID,'%s\t%6.2f\t%6.2f\t%d\t%d',SubID,ScoreFor10,ScoreFor12,Age,Gender);
for i=1:numel(EHILineScores)
    fprintf(FileID,'\t%d',EHILineScores(i));
end
fprintf(FileID,'\t%s\t%s\t%s\n',datestr(now,'yyyy-mm-dd'),datestr(now,'HH:MM:SS'),getenv('COMPUTERNAME') );
   

fclose(FileID);

end

Contact us