octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Default merged to stable for upcoming 4.2 release


From: Schöps , Sebastian
Subject: Re: Default merged to stable for upcoming 4.2 release
Date: Thu, 6 Oct 2016 10:24:58 +0000

> Am 06.10.2016 um 09:58 schrieb Schöps, Sebastian <address@hidden>:
> 
> Dear Marco,
>> ode23tb in Matlab advances with order 2
> Ok! I am sorry for claiming wrong facts. I thought we had run similar tests 
> for all Matlab solvers. Apparently not. One possibility is, that Matlab is 
> inconsistent. We will run those tests again and fix odepkg + core if 
> necessary.

Indeed, Matlab is inconsistent. ode23 (ode45) seems to use 3rd (5th) order. 
This is also good news since ode45 in core does the same.

Sebastian

%%%%%%%%%%%%%%%
solvers= {'ode23','ode45','ode23tb'};
orders = [3,5,2];
tol    = 10.^(-[6:14]);
ts     = zeros(length(tol),length(solvers));
err    = ts;
fun    = @(t,y) y;
sol    = exp(1);
tim    = [0,1];
init   = 1;
for i = 1:length(tol)
  options=odeset('AbsTol',tol(i),'RelTol',tol(i));
  for j=1:length(solvers)
    [t,x]=feval(solvers{j},fun,tim,init,options);
    err(i,j) = abs(sol-x(end));
    ts(i,j) = length(t);
  end
end

for j=1:length(solvers)
  figure;
  
loglog(ts(:,j),err(:,j),'*',ts(:,j),err(end,j)*(ts(:,j)/ts(end,j)).^(-orders(j)),'k--');
  title(solvers{j});
  legend('numerical',['order ' int2str(orders(j))]);
end
%%%%%%%%%


reply via email to

[Prev in Thread] Current Thread [Next in Thread]