# PsychToolbox MATLAB GUI

**URL:** https://psychtoolbox.discourse.group/t/psychtoolbox-matlab-gui/1549
**Category:** Uncategorized
**Created:** [March 25, 2013, 4:30pm UTC](https://psychtoolbox.discourse.group/t/psychtoolbox-matlab-gui/1549 "2013-03-25T16:30:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cliffordiworkman](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@cliffordiworkman](https://psychtoolbox.discourse.group/u/cliffordiworkman)
#### Post date: [March 25, 2013, 4:30pm UTC](https://psychtoolbox.discourse.group/t/psychtoolbox-matlab-gui/1549/1 "2013-03-25T16:30:02Z")

</div>

Hi, all,  
  
I am very new to PsychToolbox (and more specifically to measuring reaction times) -- thanks in advance for your help! I have coded a program in MATLAB to administer a novel psychological task, and I would like to collect fairly accurate reaction time measurements -- I've installed PsychToolbox onto a laptop for this purpose and would like to integrate its timing features into my program. Since I'm so new to this, I thought I would ask your opinions/advice (the experts) on whether there are problems with how I am going about this.  
  
The task presents participants with social dilemmas and then asks them to make judgments in response to the dilemmas:  
1) Their preferred choice, with choices represented as two different buttons.  
2) Emotion ratings, chosen by clicking somewhere along 7-point axes.  
3) Implicit choice preference measured using a brief implicit association task (BIAT), which looks for correct key presses.  
  
For the first reaction time measure, I am using "time0 = GetSecs;" following presentation of the stimulus item/storing gui data, and then "rxn\_time = GetSecs - time0" is the first line of code in the callback functions for both buttons.  
  
For the second measure, I store time0 the same way, and compute rxn\_time in the first line of code in the WindowButtonDownFcn callback function.  
  
For the third measure, I store time0 immediately after setting the text to which the participant responds to 'Visible', and I compute rxn\_time in the first line of code in the KeyPressFcn callback function.  
  
I would appreciate any criticisms of my approach and feedback on how to improve. Thanks so very much!  
  
Best wishes,  
Cliff  
  
Cliff Workman  
PhD Student in Psychology  
University of Manchester
