matlab中如何在解出方程解得时候直接把曲线画出来?新手求教!程序如下:[x1,x2]=dsolve('D2x1+200*x1-100*x2=0,D2x2-100*x1+200*x2=0','Dx1(0)=0,Dx2(0)=0,x1(0)=1,x2(0)=1');t=0:0.1:10;plot(t,X(1),'r');hold on;plot(t,X(2),'b');
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 01:46:04
matlab中如何在解出方程解得时候直接把曲线画出来?新手求教!程序如下:[x1,x2]=dsolve('D2x1+200*x1-100*x2=0,D2x2-100*x1+200*x2=0','Dx1(0)=0,Dx2(0)=0,x1(0)=1,x2(0)=1');t=0:0.1:10;plot(t,X(1),'r');hold on;plot(t,X(2),'b');
matlab中如何在解出方程解得时候直接把曲线画出来?新手求教!
程序如下:
[x1,x2]=dsolve('D2x1+200*x1-100*x2=0,D2x2-100*x1+200*x2=0','Dx1(0)=0,Dx2(0)=0,x1(0)=1,x2(0)=1');
t=0:0.1:10;
plot(t,X(1),'r');
hold on;
plot(t,X(2),'b');
matlab中如何在解出方程解得时候直接把曲线画出来?新手求教!程序如下:[x1,x2]=dsolve('D2x1+200*x1-100*x2=0,D2x2-100*x1+200*x2=0','Dx1(0)=0,Dx2(0)=0,x1(0)=1,x2(0)=1');t=0:0.1:10;plot(t,X(1),'r');hold on;plot(t,X(2),'b');
用函数ezplot
>> [x1,x2]=dsolve('D2x1+200*x1-100*x2=0,D2x2-100*x1+200*x2=0','Dx1(0)=0,Dx2(0)=0,x1(0)=1,x2(0)=1');
>> t=0:0.1:10;
>> ezplot(x1)
>> hold on
>> ezplot(x2)
>>