📄 dentertf2zz.m
字号:
getmodel3=figure('color',[1,1,1],'position',[0.15*winw,0.3*winh,0.7*winw,0.6*winh],...
'name','离散系统之前向通道脉冲传递函数及反馈回路脉冲传递函数','numbertitle','off','menubar','none',...
'resize','off','clipping','off');
syms a b c s t T z f
color=[0.8;0.8;0.8];
%dknum=[ ];dkden=[ ];
dhfT=get(edittime,'string');dhT=eval(dhfT);
[dktanum,dktaden]=tf2dtf(num,den,dhT);
[dhffnum,dhffden]=tf2dtf(ffnum,ffden,dhT);
uicontrol('style','frame','position',[0,0,1,1],...
'units','normalized','backgroundcolor',color);
pos=[0.01,0.85,0.32,0.1];
showtext(pos,color,'前向通道脉冲传递函数分子:');
editdknum=uicontrol(getmodel3,'style','edit','pos',[0.3,0.9,0.62,0.07],...
'string',mat2str(dktanum),'back',[1,1,1],'units','normalized');
pos(2)=0.75;
showtext(pos,color,'前向通道脉冲传递函数分母:');
editdkden=uicontrol(getmodel3,'style','edit','pos',[0.3,0.8,0.62,0.07],...
'string',mat2str(dktaden),'back',[1,1,1],'units','normalized');
pos(2)=0.65;
showtext(pos,color,'反馈回路脉冲传递函数分子:');
editdhknum=uicontrol(getmodel3,'style','edit','pos',[0.3,0.7,0.62,0.07],...
'string',mat2str(dhffnum),'back',[1,1,1],'units','normalized');
pos(2)=0.55;
showtext(pos,color,'反馈回路脉冲传递函数分母:');
editdhkden=uicontrol(getmodel3,'style','edit','pos',[0.3,0.6,0.62,0.07],...
'string',mat2str(dhffden),'back',[1,1,1],'units','normalized');
pos(2)=0.45;
showtext(pos,color,'采样周期:');
edittime=uicontrol(getmodel3,'style','edit','pos',[0.3,0.5,0.62,0.07],...
'string',mat2str(dhT),'back',[1,1,1],'units','normalized');
pos(2)=0.3;
pos(4)=0.07;
showtext(pos,color,'反馈性质确定:');
color=[0.8;0.8;0.8];
uicontrol('style','frame','position',[0.1,0.16,0.8,0.14],...
'units','normalized','backgroundcolor',color);
dfadeback=0;
radio1=uicontrol('style','radio','position',[0.52,0.18,0.15,0.1],'units','normal','string','正反馈','value',0,...
'callback','set(radio1,''value'',1);set(radio2,''value'',0);dfadeback=1;');
radio2=uicontrol('style','radio','position',[0.72,0.18,0.15,0.1],'units','normal','string','负反馈','value',1,...
'callback','set(radio2,''value'',1);set(radio1,''value'',0);dfadeback=0;');
radio3=uicontrol('style','radio','position',[0.12,0.18,0.15,0.1],'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'');dfadeback=2;');
radio4=uicontrol('style','radio','position',[0.32,0.18,0.15,0.1],'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'');dfadeback=0;');
uicontrol(getmodel3,'style','push','string','Z域分析',...
'position',[0.23,0.03,0.2,0.1],'units','normalized',...
'callback','close(getmodel3)','callback','dkreal3z;');
uicontrol(getmodel3,'style','push','string','Cancel',...
'position',[0.55,0.03,0.2,0.1],'units','normalized',...
'callback','close(getmodel3)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -