MathGroup Archive 2004

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

Search the Archive

Re: time serie -> sum inside a loop


Hi,

y[a_List, i_Integer?Positive] := 
  With[{mean = Tr[a]/Length[a]}, Tr[Take[a, i] - mean]]

Regards
  Jens

paolo wrote:
> 
> Given a time serie
> a:= {a[[1]],a[[2]],a[[3]],...,a[[n]]}
> 
> how can i solve this loop with mathematica?
> 
> -------------
> Y[[i]]:=Sum_(for k=1 to i) [a[[k]]-mu]
> -------------
> 
> where mu is the mean of time serie a.
> 
> thanks
> 
> Paolo Tarpanelli


  • Prev by Date: Notebook problem: Most of the keys are not working on SuSE
  • Next by Date: Re: Re: Can't display Times font in Windows XP
  • Previous by thread: Re: time serie -> sum inside a loop
  • Next by thread: Mozilla 1.6