I'm trying to develop a large and complicated Jacobian with abstract functions, and generate C code from it. This simple example illustrates and reproduces the error I am encountering in my much larger effort:
beta = sym( 'beta', 'real' );
functionToDifferentiate = Q( alpha, beta )
partial = diff( functionToDifferentiate, z )
The problem is the hideous syntax D([1], Q)(z/x, beta), which means "the derivative of Q with respect to its first argument, evaluated at z/x and beta". I cannot generate code from it, and I cannot subs it.
Any ideas?
Thanks in advance!