The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: response time uncertainities
Replies: 1   Last Post: Apr 7, 2013 10:17 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 19
Registered: 11/27/12
response time uncertainities
Posted: Apr 5, 2013 11:51 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I am sorry if my question seems weird on this forum, but I really don't know and get no reposen from other forums.

I'd like to understand and to know how Matlab is working for timing reaction time (e.g. response time with a keyboard, etc...).

In fact, after reading the documentation about uncertainity on this website, I'd like to know how to compute accurately the uncertainities similar to the ones reported by Presentation software with PTB. In Presentation website-> documentation, uncertainity is defined as follows (

For most systems and experiments, timing problems are very unlikely. However, to produce accurate scientific results, you need some method to detect any confounds in measurement. Presentation does this by reporting timing uncertainties. There are two major sources for the uncertainties in the times reported:

interruptions from the operating systems or device drivers (this can affect all events)
Presentation is dedicating resources to preparing stimuli (this affects non-stimulus events)

As previously discussed, uncertainties from the first category are unavoidable. In order to simultaneously monitor responses while presenting complicated and high rate multimodal stimuli, we optimized Presentation to avoid spending long uninterrupted periods of time preparing stimuli. Presentation segments the preparation of stimuli into small pieces. However, depending on the demands of the experiment and the quality of your hardware support these interruptions may remain problematic. For example, presenting videos can be very demanding on system resources and subsequently introduce further timing uncertainties.

For the majority of experiments, timing will never be a problem. However, we designed Presentation so that you receive explicit notification if either of the two problems mentioned above occur. For each event in the log file (except for pause, resume, and quit events and events for certain specialized hardware), Presentation provides a time of occurrence T and an uncertainty dT. These two numbers provide bounds on the time of occurrence of what we define as a Presentation event. The relationship between Presentation events and actual events can be complicated and in general depends on the particular type of event and the hardware involved.

Then, they present some explanation and method:

Presentation performs this timing cycle for every event. If any interruptions occur during the experiment due to operating system functions which affect the reported times of events this will be in the reported uncertainties.

Presentation allows you to send output codes associated with events from the standard serial and parallel ports. You will notice from the timing cycle that the beginning of these codes is also bounded between times T and T + dT. Therefore, the start of an output code and the associated Presentation event are never separated by more than dT.

For parallel port output, the "beginning" of the code indicates the rising edge of the pulse. For serial codes, the time of receipt of the code will be delayed by some value depending on the speed of your serial transmission.

I'd like to know if someone can explain how those incertainities are dealt with Matlab only or by Matlab + PTB if anyone use it, how to determine those values if possible and ideally give some advice on how to compute them. Thanks also for redirecting me to PTB source codes (C open source codes).

Thank you very much,

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.