<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'History in dde23' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'History in dde23' posted on the 'Matlab' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 18 Jun 2013 15:05:31 -0700</pubDate>
    <lastBuildDate>Tue, 18 Jun 2013 15:05:31 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>History in dde23</title>
      <link>http://www.programmersheaven.com/mb/ctocplusplustomatlab/429621/429621/history-in-dde23/</link>
      <description>Hi,&lt;br /&gt;
&lt;br /&gt;
I have not used dde23 before. To try it out I attempted to solve a odefunction which I have already been using with ode23. The function has no delays in it - I'm just using it to check I get the same result BUT I don't (the solutions look very different)! &lt;br /&gt;
&lt;br /&gt;
I'm guessing I'm making a basic error and I suspect its something to do with the history function - the vector I am giving it, [0.5 -0.5 0 0 ], is the same as the initial conditions I used in ode23 (so I want x(1) = 0.5, x(2) = -0.5, x(3) = 0 , x(4) = 0 at t = 0). When I run my code (see below) I don't get these initial conditions??&lt;br /&gt;
&lt;br /&gt;
I have read the dde23 help and tutorial but cant see my error?? &lt;br /&gt;
&lt;br /&gt;
Thanks for reading my query&lt;br /&gt;
&lt;br /&gt;
Ed&lt;br /&gt;
&lt;br /&gt;
function sol = delayed&lt;br /&gt;
T = 100; % simulation time&lt;br /&gt;
DelayForx1 = 1;&lt;br /&gt;
DelayForx2 = 1;&lt;br /&gt;
&lt;br /&gt;
sol = dde23(@HKB,[DelayForx1, DelayForx2],[0.5 -0.5 0 0 ],[0, T]);&lt;br /&gt;
figure;&lt;br /&gt;
plot (sol.x,sol.y)&lt;br /&gt;
&lt;br /&gt;
function dx = HKB(t,x,Z)&lt;br /&gt;
&lt;br /&gt;
alpha = 1;&lt;br /&gt;
beta = 1;&lt;br /&gt;
gamma = 0.7;&lt;br /&gt;
A = -0.3;&lt;br /&gt;
B = 0.8;&lt;br /&gt;
w=2;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dx(1) = x(3);&lt;br /&gt;
 &lt;br /&gt;
dx(2) = x(4);&lt;br /&gt;
 &lt;br /&gt;
dx(3) = -(alpha*x(1)^2 + beta * x(3)^2 - gamma)* x(3) - w^2*x(1)...&lt;br /&gt;
         +  (A + B * (x(1) - x(2))^2)*(x(3)-x(4));&lt;br /&gt;
&lt;br /&gt;
dx(4) = -(alpha*x(2)^2 + beta * x(4)^2 - gamma)* x(4) - w^2*x(2)...&lt;br /&gt;
        +(A + B * (x(2) - x(1))^2)*(x(4)-x(3)); &lt;br /&gt;
&lt;br /&gt;
dx = dx';&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/ctocplusplustomatlab/429621/429621/history-in-dde23/</guid>
      <pubDate>Mon, 24 Sep 2012 09:05:51 -0700</pubDate>
      <category>Matlab</category>
    </item>
  </channel>
</rss>