comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Oooh...! It's harder than I thought!! To get average of each line using only meaningful data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Oooh...! It's harder than I thought!! To get average of each line using only meaningful data [message #54954 is a reply to message #54949] Tue, 24 July 2007 02:47 Go to previous messageGo to previous message
weitkamp is currently offline  weitkamp
Messages: 33
Registered: October 1998
Member
On Jul 24, 10:32 am, Ingo von Borstel <newsgro...@planetmaker.de>
wrote:

> where_notzero = WHERE(data_arr NE 0,n_notzero)
> average = total(data_arr) / n_notzero

Or simply,

average = TOTAL(data_arr) / TOTAL(data_arr NE 0).

Cheers,
Timm
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL crashing on call of TV - solved
Next Topic: Re: recommendations for curve fitting

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:30:22 PDT 2025

Total time taken to generate the page: 0.96111 seconds