MathGroup Archive 2004

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

Search the Archive

Re: time serie -> sum inside a loop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46238] Re: time serie -> sum inside a loop
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 12 Feb 2004 07:16:03 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <bvvneh$j53$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

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