Azzera filtri
Azzera filtri

how to select function output in ode solver

1 visualizzazione (ultimi 30 giorni)
Robert il 20 Mar 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);

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by