MATLAB Programming/Psychtoolbox/Screen Commands/WindowScreenNumber

Usage:

screenNumber=Screen(windowPtrOrScreenNumber,'WindowScreenNumber')

Get the screen number.