matlab GUI配置传递函数和控制系统设计

1、内容简介

43-可以交流、咨询、答疑

涉及到传递函数导入、零极点展示等

2、内容说明

复制代码
% --- Executes on button press in operation.
function operation_Callback(hObject, eventdata, handles)
% hObject    handle to operation (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
val=get(handles.popupmenu2, 'value');
switch val
case 1
    getTransfer(handles);
case 2
    close(gcf)
    ComputationOfZeros('Visible','on');
case 3
    close(gcf)
    DemonstrationofZeros('Visible','on');    
end

function getTransfer(handles)
a=str2num(get(handles.mA,'string'));
b=str2num(get(handles.mB,'string'));
c=str2num(get(handles.mC,'string'));
d=str2num(get(handles.mD,'string'));
setappdata(0,'A',a)
setappdata(0,'B',b)
setappdata(0,'C',c)
setappdata(0,'D',d)
G=ss(a,b,c,d);  %创建系统模型
sys=tf(G);       %直接获取传递函数矩阵
[~,input]=size(b);
[output,~]=size(d);
str=['all transfer function (format:num/den )' 10];
k=1;
for i=1:input
    for j=1:output
       str_temp1=[['transfer function:' 'input' num2str(i) ' ' 'to' ' ' 'output' num2str(j)], 10];
       num_temp=['num' num2str(k) '=[' num2str(sys(j,i).num{1,1}),']'];
       den_temp=['den' num2str(k) '=[' num2str(sys(j,i).den{1,1}),']'];
       str_temp2=[[num_temp ',  ' den_temp], 10]; %当次循环需要输出的字符串
       str=[str,str_temp1,str_temp2];  %连接
       k=k+1;
    end
end
set(handles.edit15,'String',str);

% --- Executes on selection change in popupmenu2.

3、仿真分析

4、参考论文

相关推荐
民乐团扒谱机2 小时前
【微实验】机器学习之集成学习 GBDT和XGBoost 附 matlab仿真代码 复制即可运行
人工智能·机器学习·matlab·集成学习·xgboost·gbdt·梯度提升树
Evand J2 小时前
TDOA(到达时间差)的GDOP和CRLB计算的MATLAB例程,论文复现,附参考文献。GDOP:几何精度因子&CRLB:克拉美罗下界
开发语言·matlab·tdoa·crlb·gdop
机器学习之心HML6 小时前
MATLAB豆渣发酵工艺优化 - 基于响应面法结合遗传算法
matlab
aini_lovee1 天前
MATLAB基于小波技术的图像融合实现
开发语言·人工智能·matlab
3GPP仿真实验室1 天前
【Matlab源码】6G候选波形:OFDM-IM 增强仿真平台 DM、CI
开发语言·matlab·ci/cd
rit84324991 天前
MATLAB中Teager能量算子提取与解调信号的实现
开发语言·matlab
我找到地球的支点啦1 天前
通信扩展——扩频技术(超级详细,附带Matlab代码)
开发语言·matlab
Dev7z2 天前
基于 MATLAB 的铣削切削力建模与仿真
开发语言·matlab
fengfuyao9852 天前
基于MATLAB的表面织构油润滑轴承故障频率提取(改进VMD算法)
人工智能·算法·matlab
机器学习之心2 天前
基于随机森林模型的轴承剩余寿命预测MATLAB实现!
算法·随机森林·matlab