Simple function for calculate the slope on the ith element position
slope(x, y, i)
x
The x vector
y
The y vector
i
The position
The slope