MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: help for time series basic operations


> 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]

Just try the following:

 b = RotateLeft[a,1] - a;

I am sure there are many more ways to aceive it!

--
    Regards,                                   Feb 4
    Ravi


  • Prev by Date: Re: FactorTerms
  • Next by Date: RE: FactorTerms
  • Previous by thread: RE: help for time series basic operations
  • Next by thread: RE: help for time series basic operations