The dycon platform is a collection of common tools for the investigation of differential equations, in the context of the development of the Dycon project.
function [tline,yline] = Euler(odefun,tspan,y0,options)
tline = tspan;
yline = zeros(length(tspan),length(y0));
yline(1,:) = y0;
for i=1:length(tspan)-1
vector = odefun(tline(i),yline(i,:)')';
yline(i+1,:) = yline(i,:) + vector*(tline(i+1)-tline(i));
end
end
However, in the odefun(),
odefun(tline(i),yline(i,:)')';
the need of double transpose is strange since it requires an ode scheme to produce row vectors of states variables.
For instance, it works:
However, in the odefun(), odefun(tline(i),yline(i,:)')'; the need of double transpose is strange since it requires an ode scheme to produce row vectors of states variables.