Question: Using subs to substitute for partial derivative D[ ]

I'm using Maple to come up with equations, and then I'm substituting in variable names for functions which I can then output to Matlab.

I haven't had any problems until I ran into partial derivates described by the D[] operator.  For example, if i have a function f described by f(x(t),y(t)) and I differentiate it wrt t, I get 

D[1](f)(x(t),y(t))*(x(t)_dot) + D[2](f)(x(t),y(t))*(y(t)_dot)

I want to make a substitution for D[1](f)(x(t),y(t)) and D[2](f)(x(t),y(t)), but I can't seem to get it to work.  Seems like its just a syntax thing.

Help is appreciated!

**************

I believe I figured it out.  Just using the diff() command worked:

subs( diff(f(x(t),y(t)),x(t)) = Var, FUNCTION )

This does the trick.

Please Wait...