Borrar filtros
Borrar filtros

Controlling output of ode solvers

3 visualizaciones (últimos 30 días)
David H
David H el 13 de Jun. de 2016
I am currently running an ODE solver in the form
dy = @(t,y) M*y;
[tout,y_out] = ode45(dy, trange,yinit);
% y_out is a length(trange) by length(yinit) matrix
range_needed = [1:10,100:105]; %for example
y_needed = y_out(:,range_needed);
Essentially I only actually "want" a section of y_out in the non-time dimension. However doing the calculation as I wrong above will fill lots of the memory with values I don't actually need which is leading to problems.
I could use an output function to process the ODE output and only select this bit but the one I have written isn't very good. Is there any way to do what I can do this the ode45 options? Failing that is there a function anyone knows that does this on the FEX?

Respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by