oldRes=
SetResolution(screenNumber,width,height,[hz],[pixelSize])
oldRes=
SetResolution(screenNumber,res)
Set the resolution of the screen. This is intended to be used in
programs that run psychophysical experiments, so
SetResolution is
strict. It issues a fatal error unless it can provide exactly the
resolution you specified. (For lenience, look at
NearestResolution.)
"screenNumber" is the screen number.
"width" and "height" are the desired dimensions in pixels.
"hz" is the desired refresh rate (default is current frame rate).
"pixelSize" 8, 16, 24, or 32 bits and defaults to current pixelSize.
Returns the current resolution as "oldRes".
To display a list of available resolutions, try
ResolutionTest. Also see
NearestResolution,
ResolutionTest, and
Screen('Resolution')
and
Screen('Resolutions').
NOTE: Apple has all the new LCD screens return a frame rate of 0, so
we treat that value as a special case. A request for "hz" of
NaN will
match only with a frame rate of 0.
Originally written by Sabina Wolfson.
Psychtoolbox/PsychOneliners/SetResolution.m