📄 dmycom.m
字号:
getmodel3=figure('color',[1,1,1],'position',[0.15*winw,0.3*winh,0.6*winw,0.6*winh],...
'name','离散控制系统前向通道传递函数及反馈回路传递函数修改窗','numbertitle','off','menubar','none',...
'resize','off','clipping','off');
color=[0.7;0.7;0.7];
fdnum=[];fdden=[];
uicontrol('style','frame','position',[0,0,1,1],...
'units','normalized','backgroundcolor',color);
pos=[0.01,0.85,0.32,0.1];
showtext(pos,color,'脉冲传递函数D(z)分子:');
editfdnum=uicontrol(getmodel3,'style','edit','pos',[0.29,0.9,0.62,0.07],...
'string',mat2str(dnum),'back',[0,1,1],'units','normalized');
pos(2)=0.75;
showtext(pos,color,'脉冲传递函数D(z)分母:');
editfdden=uicontrol(getmodel3,'style','edit','pos',[0.29,0.8,0.62,0.07],...
'string',mat2str(dden),'back',[0,1,1],'units','normalized');
pos(2)=0.65;
showtext(pos,color,'前向通道传递函数Gh(s)分子:');
editfnum=uicontrol(getmodel3,'style','edit','pos',[0.32,0.7,0.62,0.07],...
'string',mat2str(ffnum),'back',[0,1,1],'units','normalized');
pos(2)=0.55;
showtext(pos,color,'前向通道传递函数Gh(s)分母:');
editfden=uicontrol(getmodel3,'style','edit','pos',[0.32,0.6,0.62,0.07],...
'string',mat2str(ffden),'back',[0,1,1],'units','normalized');
pos(2)=0.45;
showtext(pos,color,'反馈回路传递函数H(s)分子:');
edithnum=uicontrol(getmodel3,'style','edit','pos',[0.32,0.5,0.62,0.07],...
'string',mat2str(hhnum),'back',[0,1,1],'units','normalized');
pos(2)=0.35;
showtext(pos,color,'反馈回路传递函数H(s)分母:');
edithden=uicontrol(getmodel3,'style','edit','pos',[0.32,0.4,0.62,0.07],...
'string',mat2str(hhden),'back',[0,1,1],'units','normalized');
pos(2)=0.25;
showtext(pos,color,'采样周期T:');
edittime=uicontrol(getmodel3,'style','edit','pos',[0.32,0.3,0.62,0.07],...
'string',mat2str(dhT),'back',[0,1,1],'units','normalized');
pos(2)=0.22;
pos(4)=0.07;
showtext(pos,color,'反馈性质确定:');
%color=[0.8;0.8;0.8];
pos(2)=0.12;
showtext(pos,color,'分析域确定:');
color=[0.8;0.8;0.8];
uicontrol('style','frame','position',[0.3,0.20,0.5,0.085],...
'units','normalized','backgroundcolor',color);
fadeback=0;
radio1=uicontrol('style','radio','position',[0.4,0.21,0.15,0.07],'units','normal','string','正反馈','value',0,...
'callback','set(radio1,''value'',1);set(radio2,''value'',0);fadeback=1;');
radio2=uicontrol('style','radio','position',[0.6,0.21,0.15,0.07],'units','normal','string','负反馈','value',1,...
'callback','set(radio2,''value'',1);set(radio1,''value'',0);fadeback=0;');
%radio3=uicontrol('style','radio','position',[0.12,0.245,0.15,0.07],'units','normal','string','无反馈','value',0,...
% 'callback','set(radio3,''value'',1);set(radio4,''value'',0);set(radio1,''enable'',''off'');set(radio2,''enable'',''off'');set(editfnum,''enable'',''off'');set(editfden,''enable'',''off'');fadeback=2;');
%radio4=uicontrol('style','radio','position',[0.32,0.245,0.15,0.07],'units','normal','string','有反馈','value',1,...
% 'callback','set(radio4,''value'',1);set(radio3,''value'',0);set(radio1,''enable'',''on'');set(radio2,''enable'',''on'');set(editfnum,''enable'',''on'');set(editfden,''enable'',''on'');fadeback=0;');
uicontrol('style','frame','position',[0.25,0.10,0.67,0.085],...
'units','normalized','backgroundcolor',color);
dfadeback=1;
radio5=uicontrol('style','radio','position',[0.3,0.108,0.15,0.07],'units','normal','string','Z域分析','value',1,...
'callback','set(radio5,''value'',1);set(radio6,''value'',0);set(radio7,''value'',0);set(editfdnum,''enable'',''on'');set(editfdden,''enable'',''on'');set(edithnum,''enable'',''on'');set(edithden,''enable'',''on'');dfadeback=1;');
radio6=uicontrol('style','radio','position',[0.5,0.108,0.15,0.07],'units','normal','string','S域分析','value',0,...
'callback','set(radio6,''value'',1);set(radio7,''value'',0);set(radio5,''value'',0);set(editfdnum,''enable'',''on'');set(editfdden,''enable'',''on'');set(edithnum,''enable'',''on'');set(edithden,''enable'',''on'');dfadeback=2;');
radio7=uicontrol('style','radio','position',[0.7,0.108,0.18,0.07],'units','normal','string','W域分析','value',0,...
'callback','set(radio7,''value'',1);set(radio6,''value'',0);set(radio5,''value'',0);set(edithnum,''enable'',''on'');set(edithden,''enable'',''on'');set(editfdnum,''enable'',''on'');set(editfdden,''enable'',''on'');dfadeback=3;');
%uicontrol('style','frame','position',[0.25,0.3,0.31,0.1],...
% 'units','normalized','backgroundcolor',color);
uicontrol(getmodel3,'style','push','string','Ok',...
'position',[0.23,0.01,0.2,0.07],'units','normalized',...
'callback','dreal3;');
uicontrol(getmodel3,'style','push','string','Cancel',...
'position',[0.55,0.01,0.2,0.07],'units','normalized',...
'callback','close(getmodel3)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -