Re: fitting data to an integral
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Sat, 10 Mar 2007 07:10:35 -0500
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
.
- References:
- fitting data to an integral
- From: B.K. Chen
- Re: fitting data to an integral
- From: John D'Errico
- Re: fitting data to an integral
- From: B.K. Chen
- Re: fitting data to an integral
- From: John D'Errico
- Re: fitting data to an integral
- From: B.K. Chen
- fitting data to an integral
- Prev by Date: Re: Real part
- Next by Date: Re: What function is for 3D which handles the same task as polyfit??
- Previous by thread: Re: fitting data to an integral
- Next by thread: ANFIS : i have a question about it ??????
- Index(es):
Relevant Pages
|
Loading