ode45 求微分方程。

14 visualizaciones (últimos 30 días)
fafoyix
fafoyix el 25 de Nov. de 2022
Respondida: libamoh el 25 de Nov. de 2022
M文件:
function dy=Acable_Fun(t,y)
global ksi w1 a1 a2 a3 a4 OmeggaA
dy = zeros(2,1);
dy(1) = y(2);
dy(2) =-2*ksi*w1*y(2)-(w1^2+a1*sin(OmeggaA*t))*y(1)-3*a2*y(1)^2-a3*y(1)^3-4*a4*sin(OmeggaA*t);
ksi=0.006;
w1=1.8692;
a1=0.1266;
OmeggaA=2*pi*0.2787;
a2=0.0551;
a3=0.0142;
a4=0.1228;
运行
[tA2,yA2]=ode45(@Acable_Fun,[0 500],[0 0]);figure(2),plot(tA2,yA2(:,1));xlabel('时间(s)');ylabel('跨中位移(m)');yAmax2=max(yA2(3500:end,1))

Respuesta aceptada

libamoh
libamoh el 25 de Nov. de 2022
function dy=Acable_Fun(t,y)
ksi=0.006;
w1=1.8692;
a1=0.1266;
OmeggaA=2*pi*0.2787;
a2=0.0551;
a3=0.0142;
a4=0.1228;
dy = zeros(2,1);
dy(1) = y(2);
dy(2) =-2*ksi*w1*y(2)-(w1^2+a1*sin(OmeggaA*t))*y(1)-3*a2*y(1)^2-a3*y(1)^3-4*a4*sin(OmeggaA*t);
[tA2,yA2]=ode45(@Acable_Fun,[0 500],[0 0]);figure(2),plot(tA2,yA2(:,1));xlabel('时间(s)');ylabel('跨中位移(m)');yAmax2=max(yA2(3500:end,1))

Más respuestas (0)

Categorías

Más información sobre 编程 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!