Matlab - 如何在黑色全屏上绘制像素?
我希望 matlab 向我显示全黑的全屏,并且能够在其上设置像素。
有可能吗?
I want matlab to show me a full screen, all black, and to be able to set pixels on it.
Is it even possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用纯 MATLAB 代码无法完全做到这一点。在 Windows 上,我尝试了不同的组合,但任务栏仍然位于顶部(带有“开始”按钮的任务栏):
您必须编写一个 MEX 函数并直接调用 Win32 API。幸运的是,FEX 上应该已有提交实现此类功能。
这是创建全屏图形并用鼠标绘制点的示例。我正在使用 Jan Simon 的 WindowAPI 解决方案
回调函数:
You can't totally do that using pure MATLAB code. On Windows, I tried different combinations, but the taskbar will still be on top (the one with the Start button):
You would have to write a MEX function and call the the Win32 API directly. Fortunately, there should be existing submissions on FEX implementing such functionality.
Here is an example of creating a full screen figure, and drawing points with the mouse. I am using the WindowAPI solution by Jan Simon
The callback function:
查看心理物理学工具箱。它完全可以满足您的需求,甚至更多。
Check out psychophysics toolbox. It does exactly what you are looking for and more.
试试这个:
使用 Alt+F4(或等效键)关闭窗口。我不完全理解为什么你必须这样做,但这是我发现的删除窗框并使绘图扩展全屏的唯一方法。
Try this:
Use Alt+F4 (or equivalent) to kill the window. I don't fully understand why you have to do it this way, but it is the only way I've ever found to remove the window frame and make the plot extend full screen.