This is pretty strightforward:
I define a generic symbolic function, say theta(t), then later in the code I want to define the actual formula of theta(t) being, let's say, t^2.
And I need a means of substituting (or "updating") wherever I referenced theta(t) with t^2, which I assume the subs function is designed for and should do automatically.
Please let me know what am I missing or what other function to use.
syms t theta(t)
a(t) = t*theta(t)
theta(t) = t^2
ans(t) = t*theta(t)