[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Integrating a normal distribution many times
From: |
Søren Hauberg |
Subject: |
Integrating a normal distribution many times |
Date: |
Thu, 17 May 2007 13:33:05 +0200 |
User-agent: |
Thunderbird 1.5.0.10 (X11/20070403) |
Hi,
This is not necessarily an Octave question. but here goes anyway.
I need to evaluate the integrate a normal distribution over a
specific interval with many mean values. My current Octave
implementation just calls 'quad' at mean value, i.e.
for t = linspace(0, 32, 750)
qq = @(x) normal_pdf(x, t, 2.5);
result = quad(qq, 19, 26, 0)
endfor
This is, however, fairly slow. At some point my system needs to run in
real-time (not in an Octave implementation), so I doubt that the above
strategy will work. Does anybody have some hints on how to speed this
up? Should I precalculate a lookup table with some values and then
interpolate when I need to evaluate the function at a new mean value?
Søren
- Integrating a normal distribution many times,
Søren Hauberg <=