From: "Erida Gjini" <>
Newsgroups: comp.soft-sys.matlab
Subject: dde23: getting the actual step-size at each integration point
Date: Fri, 27 Jun 2008 13:37:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <g42qdv$lre$>
Reply-To: "Erida Gjini" <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1214573823 22382 (27 Jun 2008 13:37:03 GMT)
NNTP-Posting-Date: Fri, 27 Jun 2008 13:37:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1415412
Xref: comp.soft-sys.matlab:476259

I am having a problem with dde23. I wanted to use the actual
step-size used by the solver at each integration time-step,
to calculate a new variable dependent on it. I noticed
though that it happens sometimes that this step-size is
negative, meaning that time instead of only increasing
during integration, decreases at specific instances... like 
0 0.004, 0.012, 0.340, 0.190, 0.403,....

Is this possible in the way dde23 works? I use an events
function and I use the actual dt inside it, to determine
whether an event happens or not. Is that a possible cause of
the problem?

My way of achieving the actual step-size is by saving all
time-points calculated by the solver in an array:

tout=[tout;t]; % already here I see that the sequence is not
always increasing...

this_dt=all_dt(end); % sometimes gives me negative entries

I hope someone can help,
Thanks in advance,