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

📄 na.m

📁 通信系统的模拟仿真程序
💻 M
字号:
function na()
%函数na()为用负倒描述函数分析非线性系统;


clear all;
clc;

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

%创建输入界面
screen=get(0,'screensize');
winwidth=screen(3); winheight=screen(4);
mainwin=figure('Color',col0,'Pos',[0.3*winwidth,0.3*winheight,0.59*winwidth,0.5*winheight,],...
      'Name','用描述函数法分析非线性系统','NumberTitle','off',...
      'MenuBar','none','Resize','off');

dd=text(0.25,0.9,'非线性系统结构图');
set(dd,'fontsize',15,'color',[0,0,1],'fontname','宋体');
hold on;

%输入非线性环节参数按钮
uicontrol('style','push','units','normal','pos',[0.3 0.5 0.15 0.15],'string','N(A)',...
         'call','input_n');
%输入线性环节参数按钮
uicontrol('style','push','units','normal','pos',[0.5 0.5 0.15 0.15],'string','G(s)',...
         'call','input_g;');
%画一个比较器
uicontrol('style','radio','units','normal','pos',[0.2 0.55 0.03 0.04],'back',col0,'enable','off')
%描述函数法做图按钮:做负倒描述函数图、乃氏图
uicontrol('style','push','units','normal','pos',[0.25 0.1 0.2 0.1],...
         'string','-1/N(A)&&G(s)','call','na_gs');
%关闭按钮
uicontrol('style','push','units','normal','pos',[0.6 0.1 0.15 0.1],'string','&Close',...
         '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 + -