matlab零极点增益模型,[求助]怎么在GUI里面实现零极点增益计算
多谢指教。
参考了你的意见,我整理下代码:
function Untitled3
h0=figure('toolbar','none',...
'position',[20 20 800 600],...
'name','倒立摆系统稳定性实验');
h1=axes('parent',h0,...
'position',[1 1 0.9 0.9],...
'visible','off'); %#ok
b1=uicontrol('parent',h0,...
'units','points',...
'tag','b1',...
'fontsize',15,...
'style','text',...
'string','M',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 350 40 20],...
'callback',[...
'M=str2num(get(c1,''string''));',...
]);
b2=uicontrol('parent',h0,...
'units','points',...
'tag','b2',...
'fontsize',15,...
'style','text',...
'string','m',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 320 40 20],...
'callback',[...
'm=str2num(get(c2,''string''));',...
]);
b3=uicontrol('parent',h0,...
'units','points',...
'tag','b3',...
'fontsize',15,...
'style','text',...
'string','l',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 290 40 20],...
'callback',[...
'l=str2num(get(c3,''string''));',...
]);
b4=uicontrol('parent',h0,...
'units','points',...
'tag','b4',...
'fontsize',15,...
'style','text',...
'string','b',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 260 40 20],...
'callback',[...
'b=str2num(get(c4,''string''));',...
]);
b5=uicontrol('parent',h0,...
'units','points',...
'tag','b5',...
'fontsize',15,...
'style','text',...
'string','I',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 230 40 20],...
'callback',[...
'T=str2num(get(c5,''string''));',...
]);
b6=uicontrol('parent',h0,...
'units','points',...
'tag','b5',...
'fontsize',15,...
'style','text',...
'string','T',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 200 40 20],...
'callback',[...
'T=str2num(get(c6,''string''));',...
]);
c1=uicontrol('parent',h0,...
'units','points',...
'tag','c1',...
'style','edit',...
'fontsize',15,...
'string','0.5',...
'backgroundcolor',[0 1 0],...
'position',[120 350 40 20]);
c2=uicontrol('parent',h0,...
'units','points',...
'tag','c2',...
'style','edit',...
'fontsize',15,...
'string','0.3',...
'backgroundcolor',[0 1 0],...
'position',[120 320 40 20]);
c3=uicontrol('parent',h0,...
'units','points',...
'tag','c3',...
'style','edit',...
'fontsize',15,...
'string','0.2',...
'backgroundcolor',[0 1 0],...
'position',[120 290 40 20]);
c4=uicontrol('parent',h0,...
'units','points',...
'tag','c4',...
'style','edit',...
'fontsize',15,...
'string','0.1',...
'backgroundcolor',[0 1 0],...
'position',[120 260 40 20]);
c5=uicontrol('parent',h0,...
'units','points',...
'tag','c5',...
'style','edit',...
'fontsize',15,...
'string','0.006',...
'backgroundcolor',[0 1 0],...
'position',[120 230 40 20]);
c6=uicontrol('parent',h0,...
'units','points',...
'tag','c6',...
'style','edit',...
'fontsize',15,...
'string','0.005',...
'backgroundcolor',[0 1 0],...
'position',[120 200 40 20]);
c7=uicontrol('parent',h0,...
'units','points',...
'tag','c7',...
'style','edit',...
'fontsize',15,...
'string','',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[300 150 120 50]);
function c8huidiao(obj,event) %#ok
Str1='系统不稳定';
Str2='系统稳定';
q=(M+m)*(I+m*l^2)-(m*l)^2;
num=[m*l/q 0 0];
den=[1 b*(I+m*l^2)/q -(M+m)*m*g*l/q -b*m*g*l/q 0] ;
[r,p,k]=residue(num,den);
s=p;
if (real(s)>0)
set(c7,'string',Str1);
end
if (real(s)<=0)
set(c7,'string',Str2);
end
end
c8=uicontrol('parent',h0,...
'units','points',...
'tag','c8',...
'fontsize',15,...
'style','pushbutton',...
'string','result',...
'backgroundcolor',[1 0 0],...
'position',[200 150 80 50],...
'callback',{@c8huidiao});
end
在运行时,不知怎么会出现变量没定义的问题。要回去了,我就不多说了,希望你有空,给点意见。
matlab零极点增益模型,[求助]怎么在GUI里面实现零极点增益计算相关推荐
- MATLAB Simulink Missile Guidance 模型使用指南
知识的传播真是一件复杂的事,CSDN和知乎对docx的支持都不怎么友好,对mathtype公式更是垃圾一绝,同名资源在CSDN上传了PDF,免费下载. 震惊,我明明上传的是免费资源,CSDN现在强加2 ...
- auuc 评估指标_广告中增益模型理解
由于工作的需要,广告增益越来越进入到我们的视野当中,收益永远是广告主评价广告投放的重要标准,但是这种收益也慢慢被认为有两种. 一种是广告投放所带来的直接收益,比如用户A广告投放后的cvr为3%,用户B ...
- 智能营销增益模型(Uplift Modeling)的原理与实践
文章目录 增益模型因果与推论(Causal Inference) 增益模型的表示 差分响应模型(Two-Model Approach) 模型优缺点 差分响应模型升级版(One-Model Approa ...
- matlab阶跃响应_状态空间模型及MATLAB指令计算
一. 基本概念强调 时变控制系统 时变控制系统是指一个或多个系统参数会随着时间变化的系统. 2. 系统状态 系统状态是指表示系统的一组变量,只要知道了这组变量的当前取值情况.知道了输入信号和描述系统动 ...
- matlab之ma q 模型,matlab之ARMA(p,q)模型
學完MA(q),再接再厲啊! 已知零均值平穩時間序列ARMA(p,q)的自協方差函數,求系數. %ARMA(2,2) p=2;q=2; r=[5.61,-1.1,0.23,0.43,-0.1];%r1 ...
- MATLAB随机森林回归模型
MATLAB随机森林回归模型: 调用matlab自带的TreeBagger.m T=textread('E:\datasets-orreview\discretized-regression\10bi ...
- MATLAB代码:基于模型预测控制的楼宇负荷需求响应研究
MATLAB代码:基于模型预测控制的楼宇负荷需求响应研究 关键词:楼宇负荷 空调 模型预测控制 需求响应 参考文档:<Model Predictive Control of Thermal St ...
- Matlab/Simulink中PMSM模型的反电动势系数和转矩系数
Matlab/Simulink中PMSM模型的反电动势系数和转矩系数 在PMSM仿真中常常会用到永磁磁链ψ\psiψ,但是电机的参数手册中却不会直接给出永磁磁链ψ\psiψ,给出的是反电动势系数Ke和 ...
- 用MATLAB绘制国债NSS模型,Matlab在数字信号处理中的运用.ppt
<Matlab在数字信号处理中的运用.ppt>由会员分享,可在线阅读,更多相关<Matlab在数字信号处理中的运用.ppt(68页珍藏版)>请在装配图网上搜索. 1.第七讲 M ...
最新文章
- 2021年人工神经网络第四次作业 - 第三题Cifar10
- python PyQt5 slot插槽(pyqtSignal、pyqtSlot)
- Linux驱动编程 step-by-step (二) 简单字符设备驱动
- Python爬虫爬取美剧网站
- 绝对不能错过!计算机视觉入门必备
- C# App.config 详解
- 拓端tecdat|R语言逻辑回归和泊松回归模型对发生交通事故概率建模
- php 中echo命令详解,DOS中的ECHO命令详解
- VS安装VAssistX插件导致WPF-XAML文件输入中文出现乱码问题解决方案
- php网页源码库存管理系统进销存mysql数据库web结构html布局
- IV值区间与预测能力关系
- LM75 --温度采集(时序及代码)
- 图森面试官| 图森未来首席科学家王乃岩:播下去的种子,早晚会开花
- 敏捷开发“松结对编程”实践之三:共同估算篇(大型研发团队,学习型团队,139团队,师徒制度,敏捷设计,估算扑克,扑克牌估算) .
- DOS命令-格式化磁盘
- 前端性能优化:dns-prefetch和preload预加载资源
- qq修改聊天记录保存位置
- AE不能直接拖素材进来了,只能通过导入的方式,不知道是哪里出问题了?
- 安卓手机控制局域网电脑主机(开机,关机,访问共享文件)
- 计算机音乐 青春,2017年网络青春经典励志歌曲排行榜