Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: probability distribution function and isosurface
Date: Thu, 26 Aug 2010 04:08:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <i54pb5$na9$1@fred.mathworks.com>
References: <i544a1$rj9$1@fred.mathworks.com> <i54o3p$4m6$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1282795685 23881 172.30.248.38 (26 Aug 2010 04:08:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 26 Aug 2010 04:08:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:665079

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i54o3p$4m6$1@fred.mathworks.com>...
> .......
> function p = moleculepdf(x,y,z)
> p = 1/(length(X)*sigma^3*(2*pi)^(3/2)) * ...
>     sum(exp(-((x-X).^2+(y-Y).^2+(z-Z).^2)/(2*sigma^2)));
> return
> .......
- - - - - - - -
  I could just as well have said:

p = 1/(sigma^3*(2*pi)^(3/2)) * ...
    mean(exp(-((x-X).^2+(y-Y).^2+(z-Z).^2)/(2*sigma^2)));

Roger Stafford