Hello, I'm having a problem with finding the gradient of a substituted symbolic variable:
My code is:
syms x y zf = x^2 + x + y^2 - y;subs(f, y, z)g = gradient(f, [x, z])
When I run it, the gradient turns out to be [2*x+1, 0]. It doesn't seem to calculate the z variable derivative. Does anyone know why?
Tks
Best Answer