⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui_design.m

📁 经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助
💻 M
字号:
clf reset
H=axes( 'unit' , 'normalized' , 'position' ,[0,0,1,1], 'visible' , 'off' );
set(gcf, 'currentaxes' ,H);
str= '\fontname{ 隶书 } 归一化二阶系统的阶跃响应曲线 ' ;
text(0.12,0.93,str, 'fontsize' ,13);
h_fig=get(H, 'parent' );
set(h_fig, 'unit' , 'normalized' , 'position' ,[0.1,0.2,0.7,0.4]);
h_axes=axes( 'parent' ,h_fig, ...
'unit' , 'normalized' , 'position' ,[0.1,0.15,0.55,0.7], ...
'xlim' ,[0 15], 'ylim' ,[0 1.8], 'fontsize' ,8); 
%==========================================================================
h_text=uicontrol(h_fig, 'style' , 'text' , ...
'unit' , 'normalized' , 'position' ,[0.67,0.73,0.25,0.14], ...
'horizontal' , 'left' , 'string' ,{ ' 输入阻尼比系数 ' , 'zeta =' });
h_edit=uicontrol(h_fig, 'style' , 'edit' , ...
'unit' , 'normalized' , 'position' ,[0.67,0.59,0.25,0.14], ...
'horizontal' , 'left' , ...
'callback' ,[ ...
'z=str2num(get(gcbo,''string''));' , ...
't=0:0.1:15;' , ...
'for k=1:length(z);' , ...
's2=tf(1,[1 2*z(k) 1]); ' , ...
'y(:,k)=step(s2,t);' , ...
'plot(t,y(:,k));' , ...
'if (length(z)>1) ,hold on,end,' , ...
'end;' , ...
'hold off,' ]); 
%==============================================================
h_push1=uicontrol(h_fig, 'style' , 'push' , ...
'unit' , 'normalized' , 'position' ,[0.67,0.37,0.12,0.15], ...
'string' , 'grid on' , 'callback' , 'grid on' );
h_push2=uicontrol(h_fig, 'style' , 'push' , ...
'unit' , 'normalized' , 'position' ,[0.67,0.15,0.12,0.15], ...
'string' , 'grid off' , 'callback' , 'grid off' ); 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -