I have an object I would like to center in the figure frame when using fanimator. Say the x-position of the object is simply
Then, I would like to be able to use xlim in a way like
xlim([-5 5] + x(t));
However, x is just a function handle and t is undefined. How can I achieve this?