Borrar filtros
Borrar filtros

In ode45 is the initial state y0 column vector only?

2 visualizaciones (últimos 30 días)
Qiaoli Ji
Qiaoli Ji el 22 de Nov. de 2017
Comentada: Qiaoli Ji el 22 de Nov. de 2017
function dy = rigid(t,y)
dy = zeros(3,1); % a column vector
dy(1) = y(2) * y(3);
dy(2) = -y(1) * y(3);
dy(3) = -0.51 * y(1) * y(2);
options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
[T,Y] = ode45(@rigid,[0 12],[0 1 1],options);

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Nov. de 2017
No, you can use row vector initial state. The output of the ode function must be a column vector though.

Más respuestas (0)

Categorías

Más información sobre 常微分方程 en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!