Borrar filtros
Borrar filtros

how to select function output in ode solver

1 visualización (últimos 30 días)
Robert
Robert el 20 de Mzo. de 2015
Hi everyone,
I have a function that returns a (3xN ) matrix in which each column corresponds to three coupled differential equations which i want to solve using an ode solver, how do i extract each column of the output of the function separately so I can run N ode solvers to solve each of the equations? Ive tried the below where g is my function and ret is the (3xN) output matrix from the function g?
for j=1:N
[t,x] = ode45(@g((ret(1,N),ret(2,N),ret(3,N))),tspan,x0);
end
thanks

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations 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!

Translated by