Hello.
I have a list like Acc={0,1,2,2,3,3,4,5,…}; I want to integral fom Acc. with unit step. (Like Trapzoidal Method with (b-a)=1; as same as Cumtrapz Command in MATLAB . How can I do it.
Could you please help me?
Acc = {0, 1, 2, 2, 3, 3, 4, 5};
Rest[FoldList[Plus, 0, Map[Total[#]/2 &, Partition[Acc, 2, 1]]]]
Accumulate[Most@Acc + Rest@Acc]/2