相关疑难解决方法(0)

确定Matlab是否有可用的显示

我想questdlg在Matlab应用程序中使用以提示用户反馈.如果没有可用的显示(例如,通过非转发的ssh会话或者如果启动了Matlab -nodisplay),则questdlg失败(见下文).有没有办法确定是否可以从Matlab代码中获得显示,以便我可以回退到基于文本的替代方案?

如果使用该-nodisplay选项启动Matlab ,则qusetdlg生成以下输出并"挂起"Matlab(in uiwait).虽然用户可以使用它Ctl-C来逃避,但没有任何迹象表明这个选项,一个天真的用户可能会得出Matlab真正挂起的结论:

>> questdlg('test','test')
Warning: This functionality is no longer supported under the -nodisplay and
-noFigureWindows startup options. For more information, see "Changes to
-nodisplay and -noFigureWindows Startup Options" in the MATLAB Release Notes.
To view the release note in your system browser, run
web('http://www.mathworks.com/access/helpdesk/help/techdoc/rn/br5ktrh-1.html#br5ktrh-3',
'-browser') 
> In uitools/private/warnfiguredialog at 19
  In dialog at 37
  In questdlg at 117
Warning: This functionality is no longer …
Run Code Online (Sandbox Code Playgroud)

matlab user-interface command-line

20
推荐指数
1
解决办法
3930
查看次数

标签 统计

command-line ×1

matlab ×1

user-interface ×1