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、参考论文

相关推荐
十七算法实验室11 小时前
Matlab实现鼠群优化算法优化随机森林算法模型 (ROS-RF)(附源码)
开发语言·算法·决策树·随机森林·机器学习·支持向量机·matlab
软件算法开发1 天前
基于SIMP算法的材料结构拓扑优化matlab仿真
matlab·simp算法·材料结构·拓扑优化
机器学习之心1 天前
TCN-LSTM时间卷积长短期记忆神经网络多变量时间序列预测(Matlab完整源码和数据)
神经网络·matlab·lstm·多变量时间序列预测·tcn-lstm·时间卷积长短期记忆神经网络
xy_optics2 天前
Unet网络的Pytorch实现和matlab实现
网络·pytorch·matlab
xy_optics2 天前
用matlab搭建一个简单的图像分类网络
网络·matlab·分类
机器学习之心2 天前
回归预测 | Matlab实现NRBO-Transformer-GRU多变量回归预测
matlab·回归·transformer·多变量回归预测
xy_optics2 天前
用matlab探索卷积神经网络(Convolutional Neural Networks)-3
开发语言·matlab·cnn
weixin_428498492 天前
使用MATIO库写入MATLAB结构体(struct)数据的示例程序
matlab
机器学习之心2 天前
Transformer+BO-SVM多变量时间序列预测(Matlab)
支持向量机·matlab·transformer·贝叶斯优化·多变量时间序列预测
weixin_428498492 天前
将MATLAB神经网络数据转换为C/C++进行推理计算
c语言·神经网络·matlab