i would say to make it for like some 10 iterations. I understand about functions and about its time delay properties...but that is the point....how must I get this get this done?
in matlab it would go like this,
for t= 1:n
{
A(t+1) = K0*[1-exp(S)]+ A(t)*exp(S)
}
However, a recursion is not what you need. Recursion would give you A(20) without explicitly calculating the previous values. Sure, you can use a recursive function to fill a series, but that is a waste of time.
What you actually want is an array of values. Your Matlab starts indexing from 1, but C++ likes 0.
1 2 3 4 5 6 7 8
const size_t Size = 20;
double A[Size] {1.0};
constdouble es {exp(0.7)};
constdouble k {0.6 * (1.0 - es)};
for ( size_t i = 1; i < Size; ++i )
{
A[i] = k + es * A[i-1];
}