如何用ode45方程依赖空间系数
3视图(最后30天)
显示旧注释
接受回答
达洛娃
2019年3月16日
p=@(x)ssqrt(tanx)
%xlxx
%x2xx
f=######################-p(x(1)).*x(1)];
span=[02]
x0=[0.50.1]
spanx0
protom(t,x(s):1)'r'tx2'b')
2注释
达洛娃
2019年3月16日
函数显示主控
CLC清除
span=[01]
x0=[0.10.5]
[t,y] = ode45(f,tspan,x0);
X=y(:1);
Y=Y2
绘图(XY)'r')
结束
函数显示ydot=f
x1-x(1);
dx=x2
C=复杂函数%
I=复位数
ydot(1)=dx%x'
ydot(2)=-C/I*x1%x''
结束