res=
NearestResolution(screenNumber,[width,height,hz,pixelSize])
res=
NearestResolution(screenNumber [,width][,height][,hz][,pixelSize])
res=
NearestResolution(screenNumber,desiredRes)
Finds the available screen resolution most similar (in log cartesian space) to that
requested. Any argument that is [] or
NaN will be ignored in assessing similarity.
If you specify pixelSize then the returned res will specify pixelSize. Typically
you'll use the returned "res" to set your screen's resolution:
SetResolution('Resolution', screenNumber, res)
Also see
SetResolution,
ResolutionTest, and
Screen Resolution and Resolutions.
Psychtoolbox/PsychOneliners/NearestResolution.m