Path: news.mathworks.com!not-for-mail
From: "Erida Gjini" <0229156@students.uu.nl>
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$1@fred.mathworks.com>
Reply-To: "Erida Gjini" <0229156@students.uu.nl>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1214573823 22382 172.30.248.37 (27 Jun 2008 13:37:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 27 Jun 2008 13:37:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1415412
Xref: news.mathworks.com comp.soft-sys.matlab:476259


Hi,
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...

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

I hope someone can help,
Thanks in advance,
Erida