Hi all,
I am having issues setting the resolution of my mac’s screen, whereas the resolution changes work with my extended screen.
My software/hardware:
- I am working in Matlab (9.7.0.1319299 (R2019b) Update 5)
- Psychtoolbox-3 ('3.0.16 - Flavor: beta - Corresponds to SVN Revision 10582)
- MacBook pro (MacOS Mojave,13inch 2560 x1600, Intel Iris Plus Graphics 640 1536 MB)
- Extending to a Philips monitor (27inch, 1920 x 1080 ,Intel Iris Plus Graphics 640 1536 MB graphics)
My reproducible code:
Not sure if the error will reproduce on other systems:
The following works no matter the value of whichScreen
whichScreen = max(Screen('Screens'));
originalRes = Screen('Resolution',whichScreen); %get the original screen resolution
desiredRes = [1920,1080,NaN]; %the desired width and height in resolution
res= NearestResolution(whichScreen,desiredRes); %find the nearest screen resolution to the desired resolution
The following line ONLY works on my extended screen where the value of whichScreen is 1 not 0.
SetResolution(whichScreen, res); %this alters the resolution of the screen to better support cross screen adaption
Error message:
Error in function Resolution: Usage error
Invalid or mutually incompatible video settings requested!
One or more of the values are invalid or unsupported by your display device.
Error using Screen
Usage:
oldResolution=Screen(‘Resolution’, screenNumber [, newwidth][, newheight][, newHz][, newPixelSize][, specialMode]);
Error in SetResolution (line 124)
oldRes = Screen(‘Resolution’, screenNumber, nres.width, nres.height, nres.hz, nres.pixelSize);
Bear in mind I have used ‘Screen(‘Resolutions’,0)’ to check the resolutions of my mac screen and the width/height is fine, but as the Hz is 0 I think this is where the issue lies but i can’t fix.