如何修复 "Unsupported point size requested in Screen('DrawDots')" 错误?

How do I fix the "Unsupported point size requested in Screen('DrawDots')" error?

我有一个需要使用 DrawDots 函数的程序:

[minSmoothPointSize, maxSmoothPointSize, minAliasedPointSize, maxAliasedPointSize] =
Screen('DrawDots', windowPtr, xy [,size] [,color] [,center] [,dot_type][, lenient]);

我的代码行如下所示:Screen('DrawDots', scr,[x,y],r*2,color,[],2)

但是,当我 运行 代码时,我得到以下与此函数相关的错误:

PTB-ERROR: You requested a point size of 49.200000 units, which is not in the range (1.000000 to 20.000000) supported by your graphics hardware.
Error in function DrawDots:     Usage error
Unsupported point size requested in Screen('DrawDots').

我 运行 正在使用的计算机是全新的,但只有一个集成显卡(Intel UHD Graphics 630)。但是,代码在其他具有较低质量集成显卡(Intel HD Graphics 620)的计算机上运行没有问题,所以我想知道是否还有其他问题。

我尝试将 Matlab 切换到 运行 关闭 OpenGL 而不是显卡本身,但这没有用,我得到了同样的错误。而且,当 OS 设置为较低的屏幕分辨率时,我尝试 运行ning 程序,但这也没有用。我在我测试过代码的所有 PC 上 运行ning Matlab 2016b。

如能提出解决此问题的任何建议,我们将不胜感激。谢谢。

两个尝试的建议:

1) 使用 Psychtoolbox 着色器实现(在 DrawDots 调用的最终参数中使用“3”而不是“2”):

Screen('DrawDots', scr,[x,y],r*2,color,[],3)

2) 请改用 FillOval 函数,尽管每个点需要 4 个参数(因为 FillOval 也可以绘制不是圆形的椭圆),因此请注意指定坐标时的区别:

 Screen('FillOval', scr, color, CenterRectOnPointd([0 0 r*2 r*2], x, y));

我不确定您是想在一次调用中绘制单个点还是多个点,但是 DrawDotsFillOval 在多个点的参数方面也略有不同点已指定。