There are two different functions named diff().
Symbolic diff is calculus differentiation. It needs a symbolic expression (sym) or symbolic function (symfun) as its first parameter, and the second parameter is the variable of differentiation, and an optional third parameter is the number of times to differentiate. diff(f,x,1) would not be uncommon for that symbolic function (though diff(f,x) would be more likely perhaps.)
Numeric diff is successive numeric differences. It needs a numeric expression as the first parameter, and the second optional parameter is the number of times to take a difference, and the third optional parameter is the dimension to operate on. diff([3 8 4]) would be [8-3, 4-8] -> [5, -4] . It could potentially have the syntax diff(f,x,1) but if so then x would have to be either  or a positive integer giving the number of times to take take the difference, and the 1 would be the dimension to operate along.
We do not advise using diff() to estimate derivatives: most of the time it is better to use gradient() instead
[gx, gy] = gradient(f, x, y);