ODE45 not producing outputs test does not finish
Mostrar comentarios más antiguos
function xdot = TREE(t,x)
xdot = zeros(8,1);
xdot(1) = -1.71*x(1)+0.43*x(2)+8.32*x(3)+0.007;
xdot(2) = 1.71*x(1)+8.75*x(2);
xdot(3) = -10.03*x(3)+0.43*x(4)+0.035*x(5);
xdot(4) = 8.32*x(2)+1.71*x(3)-1.12*x(4);
xdot(5) = -1.745*x(5)+0.43*x(6)+0.43*x(7);
xdot(6) = -280*x(6)*x(8)+0.69*x(4)+1.71*x(5)-0.43*x(6)+0.69*x(7);
xdot(7) = 280*x(6)*x(8)-1.81*x(7);
xdot(8) = -280*x(6)*x(8)+1.81*x(7);
end
tspan = [0 300];
x0 = [1; 0; 0; 0; 0; 0; 0; 0.0057];
options = odeset('RelTol',1e-3,'AbsTol',1e-6);
tic
[t,x] = ode45(@TREE,tspan,x0,options);
timeode45 = toc
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!