I want to optimize (minimize) such a cost function:
$$\min_{x_1, x_2, \ldots, x_t} \left(\sum^t_{k=1} (y_k - \theta_k)\right)$$ where $\theta_k$ is some pre-defined constant and $dy/dt = f(x)$.
You can view $\theta_1, \theta_2, \ldots$ as a trajectory and I want to make $y$ to be close to this trajectory as much as possible by choosing a series of $x_k$. I am given an initial value of $y_0$.
I am new to optimization so I hope had made the problem clear. I want to do it in Matlab if possible.
Thanks!