How can I make correction in the constants of the model equation?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yugal Gupta
le 29 Mai 2017
Commenté : Yugal Gupta
le 30 Mai 2017
Till the nth instant of time, I have some data, using that data I have fitted the curve, have found the constants. Now at (n+1)th instant, I have one more experimental data. Using that data, I want to make some correction in the constants of the model equation without doing curve fitting for again n+1 data. How should I proceed? Thanks in Advance.
0 commentaires
Réponse acceptée
Star Strider
le 29 Mai 2017
You are doing sequential parameter estimation. A thorough discussion by James V. Beck, an expert in the field, is SEQUENTIAL METHODS IN PARAMETER ESTIMATION available free online.
It includes MATLAB code. (It was written in 2002, so it may be necessary for you to update the code.)
0 commentaires
Plus de réponses (2)
John D'Errico
le 29 Mai 2017
Modifié(e) : John D'Errico
le 29 Mai 2017
This is not even a question about MATLAB, so I'm not sure why I'm answering, therefore I must be bored. :) People think they can gain so much in problems like this. You don't in general.
If the problem is nonlinear, there is no magic updating scheme at all. Just redo the curve fit, but with one more point. Since you will use the previous start point, the estimation will be a bit more efficient, fairly robust to problems as long as the new point is consistent with the rest. The new iterations will be few since schemes like Gauss-Newton are generally quadratic in their convergence near the solution.
Again though, for the nonlinear case, there is no magic update.
If the model is linear in the parameters, then why are you bothering to ask this? Backslash is really fast. Just add the extra data point and redo the estimate. Yes, there are linear algebraic schemes to update a QR factorization to add an extra row. Then you will need to redo the solve anyway from the newly factored system. Unless you have a HUGE amount of data and you are doing this hugely many times, it will be easier to just redo the fit.
The point is, don't waste your effort in trying to optimize code for a problem that does not need the optimization in the first place. The gain, even IF you truly know what you are doing in the linear algebra won't be huge anyway. And I'm sorry to say, that if you don't know enough about the linear algebra to already have known the answer to this question in the first place, then your code will probably be far less efficient than if you had just redone the curve fit with that extra point included! (Hey, somebody had to say it.)
(IFFFF you can find code that works, written by an expert, that you will be able to use, and learn how to use, then you can gain some speed, IF it works in your MATLAB release. If you need to modify the code to make it run, then don't forget that your time is of some value too.)
Voir également
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!