I am not certain what you want.
See if the gradient funciton does what you want. It requires evenly-spaced data with known differences between the points, however you can get around that with:
dydx = gradient(y) ./ gradient(x);
That slope will probably be what you want.
If it is not, experiment!