I have a set of data which need to be modelled by a function which is defined iteratively. IE $$N(t) = 2*N(t-1)+a*N(t-1)$$
Where a is the parameter to be fitted. This isn't the function, it's just as an example. How do I go about least squares when I have an iterative function? Particularly looking for an answer which I can program in MATLAB. All the toolboxes I've seen just fit a normal function like a polynomial or something.
Anyone done this before??