Q:

Evaluating gradient at a certain point

Consider the following code:
syms x y z
f = 2*y*z*sin(x) + 3*x*sin(z)*cos(y);
gradf = gradient(f, [x, y, z]);

What I'd like to do is to evaluate gradf at a certain point (x,y,z).
How do I do that?
Thanks

A:

Use subs.
x=1; y=1; z=1;
subs(gradf)

