用matlab解微分方程组(很急)!!
解这个微分方程组dx(1)=-k1*(x(1)+n*x(2))+g1*x(1)*x(3);dx(2)=-k2*(x(2)-n*x(1))+g2*x(2)*x(4);dx(...
解这个微分方程组
dx(1)=-k1*(x(1)+n*x(2))+g1*x(1)*x(3);
dx(2)=-k2*(x(2)-n*x(1))+g2*x(2)*x(4);
dx(3)=-(1+i1+abs(x(1))^2)*x(3)+i1-1;
dx(4)=-(1+i2+abs(x(2))^2)*x(4)+i2-1;
其中k1=1000;k2=1000;i1=4;i2=4;g1=10500;g2=4350;n=0.2;
再画出x(1)和x(2)的关系图
哪位大哥帮帮忙啊 展开
dx(1)=-k1*(x(1)+n*x(2))+g1*x(1)*x(3);
dx(2)=-k2*(x(2)-n*x(1))+g2*x(2)*x(4);
dx(3)=-(1+i1+abs(x(1))^2)*x(3)+i1-1;
dx(4)=-(1+i2+abs(x(2))^2)*x(4)+i2-1;
其中k1=1000;k2=1000;i1=4;i2=4;g1=10500;g2=4350;n=0.2;
再画出x(1)和x(2)的关系图
哪位大哥帮帮忙啊 展开
2个回答
展开全部
在Matlab下输入:edit,然后将下面两行百分号之间的内容,复制进去,保存
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dxdt=zhidao_rk4_t55262177(t,x)
k1=1000;k2=1000;i1=4;i2=4;g1=10500;g2=4350;n=0.2;
dxdt=[
-k1*(x(1)+n*x(2))+g1*x(1)*x(3);
-k2*(x(2)-n*x(1))+g2*x(2)*x(4);
-(1+i1+abs(x(1))^2)*x(3)+i1-1;
-(1+i2+abs(x(2))^2)*x(4)+i2-1;
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在Matlab下面输入:
t_start=0;
t_end=10;
xx0=[0;1;0;0]; %初值
[t,x]=ode45('zhidao_rk4_t55262177',[0,t_end],xx0);
plot(x(:,1),x(:,2));
xlabel('x(1)');
ylabel('x(2)');
%具体的可以看一下论坛:
%http://www.matlabsky.cn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dxdt=zhidao_rk4_t55262177(t,x)
k1=1000;k2=1000;i1=4;i2=4;g1=10500;g2=4350;n=0.2;
dxdt=[
-k1*(x(1)+n*x(2))+g1*x(1)*x(3);
-k2*(x(2)-n*x(1))+g2*x(2)*x(4);
-(1+i1+abs(x(1))^2)*x(3)+i1-1;
-(1+i2+abs(x(2))^2)*x(4)+i2-1;
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在Matlab下面输入:
t_start=0;
t_end=10;
xx0=[0;1;0;0]; %初值
[t,x]=ode45('zhidao_rk4_t55262177',[0,t_end],xx0);
plot(x(:,1),x(:,2));
xlabel('x(1)');
ylabel('x(2)');
%具体的可以看一下论坛:
%http://www.matlabsky.cn
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
富港检测技术(东莞)有限公司_
2024-04-02 广告
2024-04-02 广告
正弦振动多用于找出产品设计或包装设计的脆弱点。看在哪一个具体频率点响应最大(共振点);正弦振动在任一瞬间只包含一种频率的振动,而随机振动在任一瞬间包含频谱范围内的各种频率的振动。由于随机振动包含频谱内所有的频率,所以样品上的共振点会同时激发...
点击进入详情页
本回答由富港检测技术(东莞)有限公司_提供
展开全部
在Matlab下输入:edit,然后将下面两行百分号之间的内容,复制进去,保存
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dxdt=zhidao_rk4_t55262177(t,x)
k1=1000;k2=1000;i1=4;i2=4;g1=10500;g2=4350;n=0.2;
dxdt=[
-k1*(x(1)+n*x(2))+g1*x(1)*x(3);
-k2*(x(2)-n*x(1))+g2*x(2)*x(4);
-(1+i1+abs(x(1))^2)*x(3)+i1-1;
-(1+i2+abs(x(2))^2)*x(4)+i2-1;
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在Matlab下面输入:
t_start=0;
t_end=10;
xx0=[0;1;0;0]; %初值
[t,x]=ode45('zhidao_rk4_t55262177',[0,t_end],xx0);
plot(x(:,1),x(:,2));
xlabel('x(1)');
ylabel('x(2)');
用dsolve命令
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function dxdt=zhidao_rk4_t55262177(t,x)
k1=1000;k2=1000;i1=4;i2=4;g1=10500;g2=4350;n=0.2;
dxdt=[
-k1*(x(1)+n*x(2))+g1*x(1)*x(3);
-k2*(x(2)-n*x(1))+g2*x(2)*x(4);
-(1+i1+abs(x(1))^2)*x(3)+i1-1;
-(1+i2+abs(x(2))^2)*x(4)+i2-1;
];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
在Matlab下面输入:
t_start=0;
t_end=10;
xx0=[0;1;0;0]; %初值
[t,x]=ode45('zhidao_rk4_t55262177',[0,t_end],xx0);
plot(x(:,1),x(:,2));
xlabel('x(1)');
ylabel('x(2)');
用dsolve命令
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询