df =
syms x
f = @(x) x^3 - 2*x^2 - 5;
df = diff(f,x)
class(df)
Notice that the class of df is sym. df is a symbolic scalar. Attempting to invoke df(po) is an attempt to index the symbolic scalar df at the location indicated by po
What you need is
df = matlabFunction( diff(f, x) )