Re: fitting data to an integral



B.K. Chen wrote:


So you have data where the integral
is given as a function of x?

Yeah~ It's a function of x. My data points are (x, f(x) )

As long as a/b>=10 or so, I'd try a
Gauss-Hermite numerical quadrature
inside the objective function. Then
any optimizer will be fine. For
smaller values of a/b, I'd just use
quad over a finite set of limits,
base the upper limit on the value
of a/b.

In cftool(Create Custom Equation --> General Equations ),
it seems that we cannot input quadl directly , does it?

B.K.

I always thought I should learn to use
that toolbox. But I wrote my own little
gui tool for nonlinear regressions long
before it existed, so my incentive was
always pretty low. ;-)

You should be able to supply your own
function as an option. Have it call
quadl. BUT BEWARE!!!!

Do not try to integrate 0 to inf.
Furthermore, use of any adaptive
quadrature on an integrand that
involves a gaussian term and where
you cannot control the gaussian
parameters will likely cause serious
problems, culminating in a secondary
request to this newsgroup.

If you use a set of fixed integration
limits, the optimizer can pass in
any set of parameters (a,b) that it
"desires". If b is very small, the
Gaussian part of the kernel becomes
an effective Dirac delta, which the
numerical integration will fail to
"see".

This is why I suggested use of a
Gauss-Hermite for large a/b. Only
use quadl for the alternative case,
and use a carefully chosen upper
limit on the integration. You can
find a nice tool for this purpose
on the FEX:

<http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=32&objectType=file>

John
.



Relevant Pages

  • Re: Concept of measure in undergraduate mathematics.
    ... >understanding limits with or without deltas and epsilons. ... >Taylor's Introduction to Measure and Probability and all was made clear. ... the earliest use of integration ... A Lebesgue extension requires the measure ...
    (sci.math)
  • Re: windowing question
    ... It's easy to take the Fourier Transform of this signal, ... Now lets apply a rectangular window to this signal, ... different window limits are kept inside one "0 section" of the train. ... b is the first FT integration limit ...
    (comp.dsp)
  • Re: Code vectorization
    ... I wanted to integrate a normal distribution between various limits. ... I also tried symbolic integration and the 'eval' function, ... work by breaking up the region over which you're integrating into smaller ... subregions and approximate the integrals on those subregions, ...
    (comp.soft-sys.matlab)
  • Re: OT: Paging the code-monkeys and managers thereof.
    ... Working on a space program where the original software was written by an American company in a modular form to be integrated "later", another Brit and I were called in to do the integration. ... The system monitored thousands of parameters between 'nominal' limits, 'safety max's' and 'emergency exceeded' limits. ... The lot had to cycle with a 'watch dog' set to 15 seconds max or an emergency flagged. ... We got it to work for a first time, when my colleague patched the watch dog out to 17 minutes and we started from there! ...
    (uk.rec.motorcycles)

Loading