MATLAB: Derivative in syms

syms

If I am using syms, and i have the following
a = b * u
then da/dt = b * du/dt.
How do I get matlab to do this rather than just assume u is not a function of t and assign a value of 1?

Best Answer

You tell MATLAB that u is a function of t.
a = subs(a,'u','u(t)');
diff(a,'t')
Related Question