ex3_32.m

来自「华东理工大学自动化系《控制系统分析、设计和应用》教材配套程序实例,有关说明: 」· M 代码 · 共 32 行

M
32
字号
% ex3_32
% 绘制二阶系统的相平面图
syms w x;
figure('pos',[50,50,200,200],'color','w');
axes('pos',[0.14,0.14,0.75,0.75]);
x1w=dsolve('D2x+Dx+x=0','x(0)=0','Dx(0)=1');
x1=subs(x1w,{w},0.5);
dx1=diff(x1);
ezplot(x1,dx1);
hold on;
x1w=dsolve('D2x+Dx+x=0','x(0)=0','Dx(0)=2');
x1=subs(x1w,{w},0.5);
dx1=diff(x1);
ezplot(x1,dx1);
x1w=dsolve('D2x+Dx+x=0','x(0)=0','Dx(0)=3');
x1=subs(x1w,{w},0.5);
dx1=diff(x1);
ezplot(x1,dx1);
x1w=dsolve('D2x+Dx+x=0','x(0)=0','Dx(0)=-1');
x1=subs(x1w,{w},0.5);
dx1=diff(x1);
ezplot(x1,dx1);
x1w=dsolve('D2x+Dx+x=0','x(0)=0','Dx(0)=-2');
x1=subs(x1w,{w},0.5);
dx1=diff(x1);
ezplot(x1,dx1);
x1w=dsolve('D2x+Dx+x=0','x(0)=0','Dx(0)=-3');
x1=subs(x1w,{w},0.5);dx1=diff(x1);
ezplot(x1,dx1);
axis([-2 2 -2 2]);
line([-2 2],[0 0],'lines',':');
line([0 0],[-2 2],'lines',':')

⌨️ 快捷键说明

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