📄 main.m
字号:
%main主界面函数
function ui2(action)
if nargin==0,
action='initialize'; %初始化
end
switch(action)
case'initialize'
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%设置各种输出显示控件
h10=uicontrol('style','text','string','北京信息科技大学','position',[0,390,170,30],'fontsize',15,'fontangle','italic','fontweight','bold','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.8 0.8 0.8],'tooltipstring','www.biti.edu.cn');
h11=uicontrol('style','text','string','微波通信技术课程设计','position',[90,300,410,50],'fontsize',28,'fontweight','bold','foregroundcolor','r','backgroundcolor',[0.8 0.8 0.8]);
h12=uicontrol('style','text','string','作者:张勤 吴莉','position',[160,230,250,30],'fontsize',20,'fontangle','italic','fontweight','bold','foregroundcolor','b','backgroundcolor',[0.8 0.8 0.8],'tooltipstring','zhangqin8701@126.com');
h13=uicontrol('style','text','string','指导教师:杨曙辉 王亚飞','position',[140,150,290,30],'fontsize',18,'fontweight','bold','foregroundcolor','r','backgroundcolor',[0.8 0.8 0.8]);
h14=uicontrol('style','text','string','信息与通信工程系','position',[140,115,290,30],'fontsize',18,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.8 0.8 0.8],'tooltipstring','www.itce.biti.edu.cn');
h15=uicontrol('style','text','string','V1.0.0@2007,Based On MATLAB7.0.1','position',[160,190,250,30],'fontsize',10,'foregroundcolor','b','backgroundcolor',[0.8 0.8 0.8],'tooltipstring','基于MATLAB7.0.1设计,欢迎指正!');
%设置最底一排按钮
h1=uicontrol('style','pushbutton','string','Smith圆图','position',[60 50 82 50],'fontsize',12,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击进入圆图演示');
h2=uicontrol('style','pushbutton','string','行波演示','position',[155 50 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击进入行波演示');
h3=uicontrol('style','pushbutton','string','驻波演示','position',[250 50 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击进入驻波演示');
h4=uicontrol('style','pushbutton','string','帮 助','position',[345 50 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','May I Help You?');
h5=uicontrol('style','pushbutton','string','退 出','position',[440 50 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击退出演示程序');
%设置最底一排按钮并定义其回调函数
set(h1,'callback',['close;hold off;clf;smith']);
set(h2,'callback',['close;hold off;clf;xing_bo']);
set(h3,'callback',['close;hold off;clf;zhu_bo']);
set(h4, 'callback','main(''callback4'')');
set(h5,'callback','main(''callback5'')');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case 'callback4'
helpdlg(sprintf('本软件包括三个子界面:\n 单击左边三个按钮进入各自演示界面。\n 单击退出按钮并确认即可关闭所有界面!'));
case 'callback5'
response1=questdlg(' 确定要退出吗?','提示');
if (strcmp(response1,'Yes'))
close;
pause(0.2);
helpdlg(' 感谢您的使用!','THANK YOU!');
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -