[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Simplet hack til glidende gennemsnit



On Wed, 17 Mar 2004, Hans Schou wrote:

> On Tue, 16 Mar 2004, Klaus Friis Østergaard wrote:
> 
> > Er der en simple vej til at lave et glidene gennemsnit via f. eks
> > sed & awk
> 
> Med awk, det er der sikkert.

Det kan sikkert også gøres i perl:
cat data | 
  perl -ane 'push @a,$F[1];print (($s+=$F[1])/@a,"\n");@a<5 or $s-=shift @a'

/Ole
-- 
Softwarepatenter, Infosoc, TCPA, terrorlovgivning, Echelon.
Hvor mange rettigheder i IT-samfundet vil du miste, før du gør noget?
IT-pol.dk gør noget! Meld dig ind: 
http://www.it-pol.dk/om/indmeldelse/view


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *