function EHIFeedback(EHITotalScoreBasedOn10Items)
YourScoreStr = 'Your handedness score is ';
OnaScaleStr = ' on a scale of -100 to +100.';
Scale1Str = 'On this scale, -100 means you use your left hand for everything,';
Scale2Str = ' 0 means you use both hands about equally, and';
Scale3Str = ' +100 means you use your right hand for everything.';
Compare1Str = 'In comparison to other people responding to the same questions,';
Compare2StrRit = 'you are "at least as right-handed as"';
Compare2StrLft = 'you are "at least as left-handed as"';
ApproxStr = ' approximately ';
Compare3StrRit = '%% of other right-handers.';
Compare3StrLft = '%% of other left-handers.';
LeftStr = 'left';
CapLeftStr = 'Left';
RightStr = 'right';
CapRightStr = 'Right';
OKButtonWidth = 60;
OKButtonHeight = 20;
OKButtonY = 5;
FeedbackX = 20;
FeedbackY = OKButtonY + OKButtonHeight + 10;
FeedbackHeight = 160;
FeedbackWidth = 500;
TotalFigureLowerLeftX = 100;
TotalFigureLowerLeftY = 100;
TotalFigureWidth = 2*FeedbackX + FeedbackWidth;
TotalFigureHeight = 2*FeedbackY + FeedbackHeight;
OKButtonX = (TotalFigureWidth-OKButtonWidth)/2; % Centered
ThisScore = round(EHITotalScoreBasedOn10Items);
if ThisScore > 0
ThisSign = '+';
% elseif ThisScore < 0
% ThisSign = '-';
else
ThisSign = '';
end
if ThisScore >= 0
Hand = RightStr;
Compare2Str = Compare2StrRit;
Compare3Str = Compare3StrRit;
LowPctile = 2;
if ThisScore >= 48
LowPctile = 10;
end
if ThisScore >= 60
LowPctile = 20;
end
if ThisScore >= 68
LowPctile = 30;
end
if ThisScore >= 74
LowPctile = 40;
end
if ThisScore >= 80
LowPctile = 50;
end
if ThisScore >= 84
LowPctile = 60;
end
if ThisScore >= 88
LowPctile = 70;
end
if ThisScore >= 92
LowPctile = 80;
end
if ThisScore >= 95
LowPctile = 90;
end
if ThisScore >= 100
LowPctile = 100;
end
end
if ThisScore < 0
Hand = LeftStr;
Compare2Str = Compare2StrLft;
Compare3Str = Compare3StrLft;
LowPctile = 2;
if ThisScore <= -28
LowPctile = 10;
end
if ThisScore <= -42
LowPctile = 20;
end
if ThisScore <= -54
LowPctile = 30;
end
if ThisScore <= -66
LowPctile = 40;
end
if ThisScore <= -76
LowPctile = 50;
end
if ThisScore <= -83
LowPctile = 60;
end
if ThisScore <= -87
LowPctile = 70;
end
if ThisScore <= -90
LowPctile = 80;
end
if ThisScore <= -92
LowPctile = 90;
end
if ThisScore <= -100
LowPctile = 100;
end
end
FigHandle = figure('MenuBar','None','NumberTitle','off','name','Feedback Form for Edinburgh Handedness Inventory','Position',[TotalFigureLowerLeftX, TotalFigureLowerLeftY, TotalFigureWidth, TotalFigureHeight]);
FeedbackHandle = uicontrol(FigHandle,'Style','text','FontName', 'FixedWidth', ...
'String',sprintf([YourScoreStr ThisSign num2str(ThisScore) OnaScaleStr '\n\n' ...
Scale1Str '\n' Scale2Str '\n' Scale3Str '\n\n' ...
Compare1Str '\n' Compare2Str ...
ApproxStr num2str(LowPctile) Compare3Str]), ... % 'FontSize',12,'FontWeight','bold',
'HorizontalAlignment','left', ...
'Position',[FeedbackX FeedbackY FeedbackWidth FeedbackHeight]);
OKButtonHandle = uicontrol('Position', [OKButtonX OKButtonY OKButtonWidth OKButtonHeight], 'String', 'OK', ...
'Callback', 'uiresume(gcbf)');
uiwait;
close(FigHandle);
end