matlab好心人帮帮忙,我弄了好几个星期了,function dydt=newday(t,y)global k r10 rou3 rou1 miu3 miu1 n w m s gama p0 pv pa f sig1 sig2;dydt=[y(2);((-y(2)^2)*0.5*rou3*y(1)*(3*(y(1)^3)+4*k)*(1/((y(1)^3)+k)^s)-1.5*rou1*y(1)^2-4*miu3*y(2)*(y(1)
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/30 00:24:03
matlab好心人帮帮忙,我弄了好几个星期了,function dydt=newday(t,y)global k r10 rou3 rou1 miu3 miu1 n w m s gama p0 pv pa f sig1 sig2;dydt=[y(2);((-y(2)^2)*0.5*rou3*y(1)*(3*(y(1)^3)+4*k)*(1/((y(1)^3)+k)^s)-1.5*rou1*y(1)^2-4*miu3*y(2)*(y(1)
matlab好心人帮帮忙,我弄了好几个星期了,
function dydt=newday(t,y)
global k r10 rou3 rou1 miu3 miu1 n w m s gama p0 pv pa f sig1 sig2;
dydt=[y(2);((-y(2)^2)*0.5*rou3*y(1)*(3*(y(1)^3)+4*k)*(1/((y(1)^3)+k)^s)-1.5*rou1*y(1)^2-4*miu3*y(2)*(y(1)^2)*(1/(k+y(1)^3))-4*miu1*y(2)*(1/y(1))-p0+pv-pa*sin(2*pi*f*t)+pg0*(r10^w)*(1/y(1)^w)-gama*pg0*(r10^w)*(1/y(1)^w)+gama*pg0*(r10^n)*(1/y(1)^n)-2*sig1*(1/y(1))-2*sig2*(1/y(2)))*((k+y(1)^3)^m)*(1/(rou3*y(1)^2-rou1*y(1)*(k+y(1)^3)^m))];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
global k=4.0703e-19;r10=3e-6;rou3=-100;rou1=1100;miu3=-0.279;miu1=0.28;n=6.21;w=3.21;m=1/3;s=4/3;gama=1.07;p0=1.013e5;pv=2.33e3;pa=1.7e5;f=2.62e4;sig1=0.04;sig2=0.073;
[t,y]=ode45(@newday,[0 40],[]);
plot(t,y(:,1),'r--')
matlab好心人帮帮忙,我弄了好几个星期了,function dydt=newday(t,y)global k r10 rou3 rou1 miu3 miu1 n w m s gama p0 pv pa f sig1 sig2;dydt=[y(2);((-y(2)^2)*0.5*rou3*y(1)*(3*(y(1)^3)+4*k)*(1/((y(1)^3)+k)^s)-1.5*rou1*y(1)^2-4*miu3*y(2)*(y(1)
变量pg0没定义
ode45中要给出初始值
newday中有三个变量就要有三个微分方程