Hi all,
I apologise if there is an obvious place I can find the answer to this, but I've googled and googled and come up empty.
I have a vector, x, that depends on a number of different symbolic variables and derivatives of those variables. ie. the terms in the vector x contain y, y', z, z', theta, theta' etc.
What I would like to do is use a command that replaces these variables and their derivatives with new variables with different names. ie. replace y, y', z, z', theta, theta' with x1, x2, x3, x4, x5, x6. Note that this isn't x1, x1', x3, x3' etc. Ie. the derivates have become new variables as well.
It seems like this is a fairly easy thing to do (it's certainly an easy thing to describe), but I'm struggling to find how to do it.
Thanks, and I appreciate any help!
------Background------
The reason I'm trying to rewrite / substitute the variables in this way is because I'm trying to get a number of equations into state-space form. However, the equations are non-linear, so I'm computing the jacobian of the states and evaluating it around an equilibrium position to linearise it.
My problem occurs when attempting to find the jacobian.
If x = [y; y'; z; z' ...] and x' = [y'; (some expression); z'; (some expression) ...]
Then Jacob(x', x) does not work.
Presumably this is because the function is struggling to partially differentiate with respect to a differential. ie. partially differentiating wrt y'. So I'm trying to replace the differentials with variables (x1, x2, x3 etc.). This will also make the equations easier to understand.