I want to get delta coefficients calculated. The definition can be found here. However, I don't know what to do with the minus indices. I have tried computing it in a slightly different way, namely:
delta[data_] :=
Block[
{
nData = Most[Prepend[data, 0]],
l = Length[data],
sum
},
N[Divide[
Plus @@ Times[data - nData, Range[l]],
Plus @@ (data ^ 2)
]]
]
My question is, whether there's other, easier way, of computing the delta coefficients?
data
. I presume thatdata
is a vector of numbers but who knows? (Right, it is only you.) $\endgroup$