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

📄 zhu_bo.m

📁 实现smith圆图显示和阻抗匹配
💻 M
字号:
%zhu_bo
function ui2(action)
if nargin==0,
    action='initialize';%初始化
end
switch(action)
    case'initialize'

axes('position',[0.1 0.2 0.8 0.8]);
x=0:0.001:8*pi;
h=plot(x,sin(x),'erasemode','xor','color','g','linewidth',2);%画正弦波
h30=uicontrol('style','pushbutton','string','返回首页','position',[60 10 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4]);
h31=uicontrol('style','pushbutton','string','Smith圆图','position',[180 10 82 50],'fontsize',12,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击进入圆图演示');
h32=uicontrol('style','pushbutton','string','行波演示','position',[300 10 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击进入行波演示');
h33=uicontrol('style','pushbutton','string','退    出','position',[420 10 82 50],'fontsize',15,'fontweight','demi','foregroundcolor',[0.2 0.6 0.4],'backgroundcolor',[0.2 0.6 0.4],'tooltipstring','单击退出演示程序');
%设置控件及其回调函数
set(h30,'callback',['clf;close;main']);
set(h31,'callback',['close;hold off;clf;smith']);
set(h32,'callback',['close;hold off;clf;xing_bo']); 
set(h33,'callback','zhu_bo(''callback33'')');
grid on;
axis([0 25 -1 1]);
text(11,0.7,'驻  波');
for i=0:pi:10000*pi%实现动画
   for a=-1:0.01:1 
    y=a*0.6*sin(0.8*x-i);
    set(h,'ydata',y);
    drawnow
   end
end

case 'callback33'
   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 + -