Hello everybody. I'm facing this problem. I have a variable q(t) time dependent. I have to derive it in MatLab and I want to substitute numerical values to q(t), qd(t) but if I do that, as one can expect, the derivative of a number is 0 and then my function is constantly equal to 0. i write here an example:
syms q(t)
f = 2*q^2;
fd = diff(f,t)
subs(fd,q,5).
The result is 4*q(t)*diff(q(t), t).
So fd is function of q and qd and I want to substitute both with numerical numbers. Do you know any solution?
Best Answer