I have a question about MATLAB symbolic variable substitution which I feel should have an elegant solution but I can't work out the method of how.
I want to substitute one symbolic variable for two symbolic variable in an equation. I have taken the differentiation of a position with respect to time to find the velocity, and then taken the differentiation of the velocity to find the acceleration. Now, I want to substitute something like vel=acc*t into the equation for velocity so as to eliminate the symbolic variable t.
For example
vel_robot=S*acc*t;
and I want it to show;
vel_robot=S*vel
This is a simplified problem of the program I am working on. Basically I need to eliminate t from my answer.
Is there a way to do this in MATLAB? I know I can substitute one symbolic variable with another using vel_robot = subs(vel_robot,acc,vel) but what I want to know is if I can substitute two symbolic variables with another e.g. vel_robot = subs(vel_robot,acc*t,vel) - N.B. Subs doesn't work in this case.
Thank you!
control+Ha chance. Or if your answer is simple enough perhaps dividing byacc*tcan do the trick. - Dennis Jaheruddin