ex10_2.m

来自「基于WEB与MATLAB编写的信号处理的源码,书名为"应用WEB和MATLAB的」· M 代码 · 共 24 行

M
24
字号
% Example 9.2
t = 0:.4:50;
Kp = 100;
num = .06*Kp;
den = [1 .01+.001*Kp];
y1 = step(num,den,t);
Kp = 200;
num = .06*Kp;
den = [1 .01+.001*Kp];
y2 = step(num,den,t);
Kp = 500;
num = .06*Kp;
den = [1 .01+.001*Kp];
y3 = step(num,den,t);
plot(t,y1,t,y2,t,y3);
xlabel('Time (sec)')
ylabel('y(t)')
% the following adds a legend
hold on
plot([13 21],[39 37],[9 21],[45 41],[5 21],[52 45])
text(22,45,'Kp = 500')
text(22,41,'Kp = 200')
text(22,37,'Kp = 100')
hold off

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?