Hi Robin,
I understand that you would like to know if exists a way to use a light gun as an input to MATLAB.
Using a light gun as an input to MATLAB would depend on whether the light gun can be recognized as a standard input device by your operating system (like a mouse or a joystick). If it can, then you should be able to use it with MATLAB.
As for “Psychtoolbox”, it has functions to get input from a mouse and a joystick. If your light gun can emulate a mouse, you can use the “GetMouse” function or else if your light gun can emulate a joystick, you can use the “Gamepad” function in “Psychtoolbox” to get the position and button state of the light gun.
To learn more, you can refer to the following documentation links:
- GetMouse: http://psychtoolbox.org/docs/GetMouse
- Gamepad: http://psychtoolbox.org/docs/Gamepad