/
mpsy_2afc_gui.m
47 lines (40 loc) · 1.78 KB
/
mpsy_2afc_gui.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% a GUI for answers of the test subject in 2 AFC tasks
%
% Usage: mpsy_2afc_gui
%
% Copyright (C) 2003, 2004 Martin Hansen
% Author : Martin Hansen, <psylab AT jade-hs.de>
% Date : 3 Apr 2005
% Updated: < 7 Nov 2016 15:04, martin>
% added call to guidata in callback functions, to also let
% the figure store the last user answer in its guidata
% Updated: < 6 Jan 2006 21:11, mh>
%% This file is part of PSYLAB, a collection of scripts for
%% designing and controlling interactive psychoacoustical listening
%% experiments.
%% This file is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published
%% by the Free Software Foundation; either version 2 of the License,
%% or (at your option) any later version. See the GNU General
%% Public License for more details: http://www.gnu.org/licenses/gpl
%% This file is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% create the general GUI
mpsy_afc_gui;
% and place the two buttons for the two alternative user answers
% (variable 'M.UA')
afc_but(1) = uicontrol('Parent', psylab_gui, ...
'Unit','normalized', 'Position',[0.1 0.55 0.3 0.3], ...
'Callback','M.UA=1; guidata(psylab_gui, M.UA);', ...
'Tag','afc_answer1', ...
'String','1', 'FontSize', 14);
afc_but(2) = uicontrol('Parent', psylab_gui, ...
'Unit','normalized', 'Position',[0.6 0.55 0.3 0.3], ...
'Callback','M.UA=2; guidata(psylab_gui, M.UA);', ...
'Tag','afc_answer2', ...
'String','2', 'FontSize', 14);
% End of file: mpsy_2afc_gui.m
% Local Variables:
% time-stamp-pattern: "40/Updated: <%2d %3b %:y %02H:%02M, %u>"
% End: