The traditional iterated map can be implemented with NestList, such as the Logistic Map, x[n+1]=rxn, can be implemented with the single line:
NestList[r#(1-#),x0,10]
I want to implement an iterated map with delay. That is, I want to have a function where x[n] is a function of something earlier than x[n-1], I want to calculate x[n] as a function of x[n-k]. That is, I wish to calculate x[n]=rxn-1. As in a delayed equation, there would need to be a history, let's say that x[(n-k)<0]=0. Let's say that k=20 or so.
I am sorry to give so little starting code, but my trouble here is conceptual. Is this a problem best performed with NestList, or some other function. Would a NestList of a NestList be appropriate, or is there some simpler implementation?
Thanks very much.
EDIT October 3: Revisiting the problem. I found the specific example of Buchner's Logistic map with a delayed feedback:
x[n + 1] == (1 - K) r x[n] (1 - x[n]) + K x[n - k]
where K is the feedback gain and k is the feedback delay. Very helpfully, the above system can be rewritten as a set of k+1 coupled iterated functions with no delay, i.e. (below as equations, not mathematica code):
x1(n+1)=(1-K)r*x1(n)[1-x1(n) + K x2(n)
x2(n+1)=x3(n)
x3(n+1)=x4(n)
...
xk(n+1)=x1(n)
So with a fixed value of k, I can rewrite the system such as:
Module[{K = .2, r = 3.6, x1 = 1, x2 = 1, x3 = 1, x4 = 1, x5 = 1},
dataNest = NestList[
{(1 - K) r #[[1]] (1 - #[[1]]) + K #[[2]],
#[[3]],
#[[4]],
#[[5]],
#[[1]]} &,
{x1, x2, x3, x4, x5},
100];
ListLinePlot[dataNest[[All, 1]]]
]
Now all I need to figure out is how to abstract this to any value of k, but this is a much more well-defined question than my first query.