I have a data which looks like this {x,y}:
data={{1,3},{2,4},{3,5},{4,6}}
I need to add another column and define it as current element divided by previous element.
This could be done like this:
For[i = 1, i <= Length[data], i++,
If[i == 1, data[[i]] = Append[data[[i]], 1],
data[[i]] = Append[data[[i]], data[[i, 2]]/data[[i - 1, 2]]]]]
However, I think that in Mathematica there may be a better way to do it
What is the easiest way to do this in Mathematica?