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

📄 lab031.m

📁 控制系统仿真中的频率特性的MATLAB源码
💻 M
字号:
function lab031()

clear all;
clc;


col0=[0.7 0.7 0.7]; %灰色
col1=[1 1 1]; %白色

mainwin=figure('Color',col0,'Pos',[100 150 600 400],...
      'Name','方框图模型','NumberTitle','off',...
      'MenuBar','none','Resize','off');

dd=text(0.25,0.9,'根轨迹实验窗口');
set(dd,'fontsize',20,'color',[0,0,1],'fontname','宋体');
hold on;

%输入前向通道参数按钮
uicontrol('style','push','units','normal','pos',[0.4 0.5 0.15 0.15],'string','G(s)',...
        'fontsize',15 ,'call','input_g1');
     
%输入反馈参数按钮
uicontrol('style','push','units','normal','pos',[0.4 0.3 0.15 0.15],'string','H(s)',...
         'fontsize',15,'call','input_h');

%画一个比较器
uicontrol('style','radio','units','normal','pos',[0.2 0.55 0.03 0.04],'enable','off','back',col0)

%画根轨迹图
uicontrol('style','push','units','normal','pos',[0.25 0.1 0.2 0.1],...
         'string','根轨迹图','fontsize',15,'call','root01');

%关闭按钮
uicontrol('style','push','units','normal','pos',[0.6 0.1 0.15 0.1],'string','退出',...
         'fontsize',15,'call',['clear all;clc;close;']);
%画方框图的信号线
x=[0 0.88 0.8 0.8 0.11 0.11];
y=[0.57 0.57 0.57 0.3 0.3 0.57];
plot(x,y,'k');
hold on;
%画负反馈的'-'号
x=[0.05 0.08];y=[0.5 0.5];
plot(x,y,'k');
hold on;
%画信号线上的箭头
x=[0.06 0.09 0.06];
y=[0.59 0.57 0.55];
plot(x,y,'k');hold on;
x=[0.85 0.88 0.85];
y=[0.59 0.57 0.55];
plot(x,y,'k');hold on;
x=[0.095 0.11 0.125];
y=[0.5 0.55 0.5];
plot(x,y,'k');hold on;
dd=text(-0.1,0.65,'输入R(t)');
set(dd,'fontsize',15,'color',[0,0,1],'fontname','宋体');
dd=text(0.8,0.65,'输出C(t)');
set(dd,'fontsize',15,'color',[0,0,1],'fontname','宋体');

axis([0 1 0 1]);
axis off;







⌨️ 快捷键说明

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