%普通对话框
dialog %单击时会关闭当前窗口
%自定义 关于对话框 点击确定 关闭
h = dialog('name','关于...','Position',[200 200 200 70]);
uicontrol('parent', h , 'Style','pushbutton','Position',[80 10 50 20], ...
'string','确定','Callback','delete(gcbf)');
%错误对话框
errordlg
doc errordlg
%警告对话框
warndlg
View Code
空白对话框:
自定义对话框:
错误对话框:
警告对话框: