Re: Time series minima and maxima
- To: mathgroup at smc.vnet.net
- Subject: [mg115921] Re: Time series minima and maxima
- From: Jagra <jagra24891 at mypacks.net>
- Date: Wed, 26 Jan 2011 05:03:53 -0500 (EST)
- References: <ihm4nf$kgv$1@smc.vnet.net>
Looks like I pasted an extra line in the findMinimaMaxima function it should read: findMinimaMaxima[data_, window_] := With[{k = window}, data[[k + Flatten[Position[Partition[data[[All, 2]], 2 k + 1, 1], x_List /; x[[k + 1]] < Min[Delete[x, k + 1]] || x[[k + 1]] > Max[Delete[x, k + 1]]]]]]]