Display stimuli only on second monitor

Hi,

I used [win,rect]= PsychImaging(‘OpenWindow’, 0, 0.5, scrsize) to open the window and drawdots after that. I have two monitors and used “extended monitor” mode. I would like to display the stimuli only one the second monitor as I want to control the Matlab on the first monitor.
I tried [win,rect]= PsychImaging(‘OpenWindow’, 2, 0.5, scrsize) and it had error.
Please suggest which parameters I can change so that stimuli can only be displayed on the second monitor.
Thanks.

Whats the error? you should open a window on screen 1 or 2, assuming
you are indeed using extended mode (and don’t care about reliable
timing)

the error was that the stimuli were displayed on both screens though I used extended mode and [win,rect]= PsychImaging(‘OpenWindow’, 0, 0.5, scrsize).

When I used [win,rect]= PsychImaging(‘OpenWindow’, 2, 0.5, scrsize), it showed screenid 2 is not identified though two monitors are connected.

Two things.
1 what does Screen(‘Screens’) return?
2. did you connect the second screen later after starting up the computer/matlab? You may need to clear all to re-enumerate the screens

  1. it returns [0 1 2];
  2. I connected the second monitor first and then ran the psychtoolbox.

Edited: [win,rect]= PsychImaging(‘OpenWindow’, 2, 0.5, scrsize) doesn’t give me error somehow anymore. The stimuli was displayed only one the main screen which matlab is running, not on the second screen no matter what value I put 0, 1 or 2.

You probably set some non-sensical scrsize which conflicts with specified screen number. Try scrsize = [] to leave it at auto-selected settings.

For more help → PsychPaidSupportAndServices.
-mario