There is a fwidth(p) function:
Returns the sum of the absolute derivative in x and y using local differencing for the input argument p, i.e.:
return = abs(dFdx (p)) + abs(dFdy (p));