curve fitting function suggestion
1 view (last 30 days)
Show older comments
Hi,
I need to fit a couple points (12 points for now, later might need to fit 60 points) to an equation with multi-layers, the equation looks like l(g(convolution(f(t),exp(k)),s)), variables I need to fit in are t, k and s. equation layers are l(),g(),f().
Please give some suggestion on which MATLAB fitting function I should use, besides lsqcurvefit.
Very much appreciated.
2 Comments
Star Strider
on 26 Sep 2014
As far as I know, lsqcurvefit, the Statistics Toolbox function nlinfit, and the Curve Fitting Toolbox (that I don’t have so can’t comment on it) are the only options.
What do you have against lsqcurvefit? It’s probably the most robust of the lot.
Answers (1)
Star Strider
on 27 Sep 2014
My pleasure!
The other option that occurs (and didn’t before) is that if you have the Global Optimization Toolbox are the many optimization functions it has: genetic algorithms, pattern search, and others. GAs are easy enough to write if you have to, but they can be a bit challenging to ‘tune’ to be most efficient. They don’t use gradient descent, so they’re relatively free to wander around the regression surface looking for the lowest error. Their other disadvantage is that they take their time doing so. Obviously the more parameters you’re estimating, the more challenging the problem to estimate them. I would start with patternsearch if you have it. If you don’t, and don’t want to write a genetic algorithm, I recommend the Genetic Algorithms Toolbox from Sheffield University (U.K). Those are certainly ‘scientific’ — the theory goes back to Darwin!
I don’t entirely understand the problem with your lookup table, since I suspect you calculated it somehow. If your lookup table gives good results and has a solid mathematical basis, I would see no reason not to use it. A literature search supporting its use would likely be worth a few minutes of your time, especially if it gives low errors and reproducable results for your estimated parameters. If you developed your lookup table and it works for problems you are dealing with, enlarge on its theoretical (mathematical and statistical) basis and publish it as a method. You might be onto something!
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!