Re: help for time series basic operations

*To*: mathgroup at smc.vnet.net*Subject*: [mg46075] Re: help for time series basic operations*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>*Date*: Thu, 5 Feb 2004 04:02:54 -0500 (EST)*Organization*: Universitaet Leipzig*References*: <bvpaq9$scp$1@smc.vnet.net>*Reply-to*: kuska at informatik.uni-leipzig.de*Sender*: owner-wri-mathgroup at wolfram.com

Hi, ser = Table[a[i], {i, 1, 8}]; ListConvolve[{1, -1}, ser] or Subtract @@@ Reverse /@ Partition[ser, 2, 1] Regards Jens paolo wrote: > > I am a quantitative analyst and for the first time i am using Mathematica. So, I > am sorry if my question seem "very easy (almost stupid)" but i need some helps > to begin to understand Mathematica > > I have a time series > a:=[a_1,a_2,a_3,a_4,...a_n] > how can i do to subtract each element for the previous one?: > > b:=[a_2 - a_1, a_3 - a_2, a_4 - a_3,.....,a_n - a_n-1] > > Thanks > > Paolo Tarpanelli