PDL::Stats is awesome! Everyone should use it! But for general averaging
over an arbitrary kernel, you would need to use
conv1d<http://pdl.perl.org/?docs=Primitive&title=PDL::Primitive#conv1d>
.

David


On Tue, Nov 19, 2013 at 11:59 PM, Derek Lamb <[email protected]> wrote:

> use PDL::Stats; #get from CPAN
> $ma = $data->filter_ma($window_half_size);
>
> Be careful at the boundaries--it just repeats the first or last value as
> many times as necessary to get you the right window, so you might have to
> do something more clever if you plan on using the values near the edges and
> that approach isn't good enough.
>
> PDL::Stats::TS (imported by PDL::Stats) has basic Time Series functions.
>
> Derek
>
> On Nov 19, 2013, at 9:44 PM, mraptor wrote:
>
> > How do you guys will do moving average ?
> > Or for that matter similar functional like problems ...
> >
> > thanks
> >
> > _______________________________________________
> > Perldl mailing list
> > [email protected]
> > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> >
>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>



-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to