linearmo.m
来自「《嵌入式控制系统及其CC++实现-面向使用Matlab的软件开发者》源码」· M 代码 · 共 45 行
M
45 行
% Embedded Control Systems in C/C++
% by Jim Ledin
%
% Chapter 3 linear models
% This M-file requires the Control System Toolbox
% Create a transfer function model
tfplant = tf(100, [1 1.8 100])
% Convert the model to a frequency domain representation
freqs = logspace(0, 2);
frplant = frd(tfplant, freqs);
% Create a Bode plot of the frequency response model
bode(frplant)
% Extract the frequency response data from the model
[response, freqs] = frdata(frplant);
% Create a new frequency response model from the data
frplant2 = frd(response, freqs);
% Create a state space model from the transfer function above
ssplant = ss(tfplant)
% Convert the state space model to a transfer function
tfplant2 = tf(ssplant)
% Add a delay at the state space model input
ssplant.inputdelay = 0.1
% Compute the eigenvalues of the transfer function and state space models
eig(tfplant)
eig(ssplant)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?