Psychomotor Vigilance Task (PVT)

Version 1.0.1 (1.83 KB) by David Hill
The psychomotor vigilance task (PVT) is a sustained-attention, reaction-timed task.
Updated 11 Feb 2022

View License

The PVT is a simple task where the subject presses a keyboard key as soon as the red square appears. The red square will turn on randomly every few seconds for an input duration (in seconds, normally 600 to 900). The main measurement of this task is not to assess the reaction time, but to see how many times the button is not pressed when the light is on. The purpose of the PVT is to measure sustained attention, and give a numerical measure of sleepiness by counting the number of lapses in attention of the tested subject.
I implimented the PVT using a GUI with a black background. A red square will display in the center of the background periodically during the testing period, and the subject is expected to press any keyboard key once the red square appears. If the subject does not press a key within 30 seconds, the red square is removed and the subject is allocated a 'sleepAtack'. If the subject responds within 500 msec of the red square appearing (but greater than 150 msec), then the subject is allocated a mark in the 'good' category. If the response is too quick, the subject is allocated a mark in the 'tooFast' category. The lapse category is greater than 500 msec. Pressing a key when the red square is not present scores a mark in the excessiveClick category.
To execute a test for a subject for 10 minutes:

Cite As

David Hill (2024). Psychomotor Vigilance Task (PVT) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

Added image