0

I'm starting with Matlab, so doing the tuto from peterscarfe.com. I have 2 screens on my computer, but when I run the first code of the tuto, it seems that it recognizes those 2 screens as one larger :

% Clear the workspace and the screen
sca;
close all;
clearvars;

% Here we call some default settings for setting up Psychtoolbox
PsychDefaultSetup(2);

% Get the screen numbers. This gives us a number for each of the screens
% attached to our computer.
screens = Screen('Screens');

with this code, screens=0, while i was expecting a vector [0 1] ? Because I would like to have my Matlab window on a screen, and my PTB one on the other... I see there is the physicalDisplays to set in the screen function, but when I try with physicalDisplays=1, or just '1', it does not work, I don't know what kind of syntax is expected. Thank you!

EDIT: sorry i forgot i’m on linux, ubuntu 16.04 .

FH31
  • 1
  • 2
  • Which operating system are you using? – DMR Feb 20 '19 at 19:03
  • Linux ubuntu 16.04 – FH31 Feb 21 '19 at 13:31
  • The behavior of Screen('Screens') can vary slightly between operating systems. The command you used, screens = Screen('Screens');, should return two screen values ([0 1]) as you were originally expecting. But, this can be more complex on a Linux system because more than one physical display can be part of one x-screen. I would try configuring your displays to be part of separate x-screens, for example: https://help.ubuntu.com/community/NvidiaMultiMonitors – DMR Feb 22 '19 at 22:29
  • I used sudo NVidia settings, added a new screen (0 1) and it works, the problem was that the 2 screens were part of one! Thanks – FH31 Feb 23 '19 at 11:51

0 Answers0