如何用matlab求解非线性微分方程组如何用matlab求解dx/dt=0.11*s*x/(0.006*x+s),ds/dt=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03),

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 20:36:28
如何用matlab求解非线性微分方程组如何用matlab求解dx/dt=0.11*s*x/(0.006*x+s),ds/dt=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03),
xMSFǿ3`]ɶ`siz%ы n$vO SHɘblx%W#&9pLfh+)^s s$swݝ7ŵ1^EYgw&'0G_^a5_@li"|_+/`~ a_ .Ogwg$R2%??ҦД27.LRZ-rJ>u*J/SGD1j\BH*Ԩ&*  RA()AVXʖTˊJGH0UXIK(l{TX%,J1QbWBU#aEc'p c/zu.a*65mBsKL:iuwf:VjHC% E|9] h'%GMRR@A)5%ɚ!>g:gcfnHXݮ[nT @Zw筹zgjӪMtAگ[WW|9ͧI/yL{=:COyӱWtR+fS){[i,JB/Mр_XK̎l)zkB6'ѼƁZ4iom]hp9qVrw:V6ެ9ChݴW`~.8ܴ t<{o{q

如何用matlab求解非线性微分方程组如何用matlab求解dx/dt=0.11*s*x/(0.006*x+s),ds/dt=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03),
如何用matlab求解非线性微分方程组
如何用matlab求解dx/dt=0.11*s*x/(0.006*x+s),ds/dt=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03),

如何用matlab求解非线性微分方程组如何用matlab求解dx/dt=0.11*s*x/(0.006*x+s),ds/dt=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03),
使用符号运算工具.
首先定义变量符号
syms s x t;
使用字符串定义公式
eq1 = 'diff(x,t) = 0.11*s*x/(0.06*x+s)';
eq2 = 'diff(s,t) = (-1)*0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03)';
接下来是求解 比如现在要求解s,下面的代码可以给出s的表达式
solution = solve(eq1,eq2,s);
接下来求值
首先给变量赋值
x = 1;
t = 1;
之后运行
result = eval(solution);
可以求出解.
我现在写出的代码可能有错误,不过思路是这样的.我没调试.详细情况可以搜索 matlab 符号运算.

若求解析解,没有解,过程如下:
dsolve('Dx=0.11*s*x/(0.006*x+s)','Ds=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.003)','t')
Warning: Explicit solution could not be found.
> In dsolve at 101

...

全部展开

若求解析解,没有解,过程如下:
dsolve('Dx=0.11*s*x/(0.006*x+s)','Ds=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.003)','t')
Warning: Explicit solution could not be found.
> In dsolve at 101

ans =

[ empty sym ]
若求数值解,过程如下:
m函数定义:
function dy=f7(t,y)
dy=[0.11*y(1)*y(2)/(0.006*y(1)+y(2));-0.029*y(1)-0.234*y(2)/(0.006*y(1)+y(2))-y(2)/(30*y(2)^2+300*y(2)+0.003)];
主程序:
[t,y]=ode45('f7',[0,20],[0;0])
t =
0
0.5000
1.0000
1.5000
2.0000
2.5000
3.0000
3.5000
4.0000
4.5000
5.0000
5.5000
6.0000
6.5000
7.0000
7.5000
8.0000
8.5000
9.0000
9.5000
10.0000
10.5000
11.0000
11.5000
12.0000
12.5000
13.0000
13.5000
14.0000
14.5000
15.0000
15.5000
16.0000
16.5000
17.0000
17.5000
18.0000
18.5000
19.0000
19.5000
20.0000
y =
0 0
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
NaN NaN
貌似也不理想,不知道是不是初值设的不好的原因!

收起

如何用matlab求解非线性微分方程组如何用matlab求解dx/dt=0.11*s*x/(0.006*x+s),ds/dt=-0.029*x-0.234*s/(0.006*x+s)-s/(30*s^2+300*s+0.03), 如何用matlab解二维的非线性偏微分方程组,其中每个方程是抛物线型的 如何运用matlab求解非线性偏微分方程组 如何用matlab解非线性方程? 用Matlab能求解二元二阶微分方程组,求Matlab程序!方程组如图. 如何用MATLAB求解如下代数黎卡提方程组? matlab 微分方程组求解 maple 12 求解非线性微分请问如何用maple求解 x''+ x + 0.01 x^3= cost 如何用matlab求解非线性规划问题 最好给几个例子 如何用Matlab解偏微分方程组该方程组由两个抛物型偏微分方程组成 怎样用Matlab求解非线性方程组 包含积分,微分,代数方程的方程组如何用Matlab求解?可能用到的初值上面的方程组可以用Matlab求解吗?该如何求解呢,第一个微分方程还是分段的 如何用matlab画一个微分方程组的图,具体要求如下 偏微分方程组的MATLAB解法?一个带边界的偏微分方程组,如何用matlab求其数值解?最好有MATLAB程序? matlab求解以下微分方程组! Matlab解非线性微分方程组的问题要求解的方程组为:dx/dt=-x+y^2dy/dt=-2y+x^2x(0)=y(0)=1如何用Matlab解该方程组,并且画出相轨图(即x-y图象)?我用dsolve函数, 如何用matlab实现非线性方程组的牛顿法求解?具体题目是:f1(x,y)=x^3+(x-y)^2-12f2(x,y)=(x-y)^2-y^1.5+4;感激不尽! 如何用lingo或者matlab求解一元二次方程组?当1=《x=