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

Home » Public Forums » archive » Re: weighted Gaussian distribution mean
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: weighted Gaussian distribution mean [message #47518] Tue, 14 February 2006 06:48
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
maffie wrote:
> Hi all,
>
> I have really don`t succeed in doing the following:
>
> I have an 24x29 array, where fromm I would like to calculate a
> weighted, Gaussian distribution mean with the central point of this
> 24x29 array as the centre of the Gauss-distribution. Any help is
> welcome, because I can't see a solution....

cols = 24
rows = 29
x = replicate(1.0, cols)#indgen(rows)
y = indgen(cols)#replicate(1.0,rows)
weight = exp( -((x - 0.5*rows)^2 + (y - 0.5*cols)^2)/sigma^2 )
average = total(data*weight)/total(weight)

You have to provide "data", and you have to choose a value for sigma.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NVidia Quadro4 980 XGL card + IDL
Next Topic: Re: Multiple Axes

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

Current Time: Wed Oct 08 14:00:24 PDT 2025

Total time taken to generate the page: 0.00427 seconds