Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


Torsten
Posts:
1,450
Registered:
11/8/10


Re: Logistic equation with delay
Posted:
Mar 21, 2014 8:57 AM


"Adin" wrote in message <lghcg7$nqs$1@newscl01ah.mathworks.com>... > "Torsten" wrote in message <lggr8s$dj8$1@newscl01ah.mathworks.com>... > > "Adin" wrote in message <lggbgg$95h$1@newscl01ah.mathworks.com>... > > > I am trying to solve a logistic equation with delay WITHOUT using dde23. So the delay is of the form: ddtN(t)=N(t)(abN(t?t)),a>0,b>0 > > > > > > I have a function called logistic that looks like this: > > > function dN = logistic(t,N) > > > global a b; > > > dN = (aN.*b)*N; > > > > > > And another file that calls this function with ode45 like this: > > > global a b; > > > a = 4; > > > b = 1; > > > [t, N] = ode45('logistic', [0:.01:5], 10); > > > > > > > > > > ok, here you try to solve the _continuous_ logistic equation without delay. > > > > > I think I understand how to write a forloop to calculate the logistic equation with delay of 1 since I'm picking my ? to be 1; but I'm not getting the correct results. Here is the code: > > > S=zeros(501,1); > > > t=zeros(501,1); > > > S(1)=0; > > > > > > for iterate=1:501 > > > S(i) = S(i1) + r*S(i1)*(1b*S(i1)) > > > end > > > plot(t,S) > > > > > > > ok, here you try to solve the _discrete_ logistic equation without delay (although the case S(1)=0 is not that interesting) > > > > > > > > Any ideas? > > > > And where do you try to solve the continuous logistic equation with delay ? > > > > Best wishes > > Torsten. > > Oh, I thought I was solving for the continuous logistic equation with delay on the last part but I guess not....what do I have to add/change to do that then?
You'll have to use dde23.
Best wishes Torsten.



