Fitting of parameters of function with discrete / integer argument
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Could somebody help me find the proper way to find the parameters for a function with integer arguments? I've conducted a series of measurement:
p_1 , p_2 , p_3 , (p_1+p_2)/2 , (p_2+p_3)/2 , (p_1+p_3)/2, (p_1+p_2+p_3)/3 , ....
(and so on, up to 10 parameters). Each measurement has its own measurement error and I would like to find the proper way to find parameters p_1 , p_2 , p_3, with standard deviation...
Thanks in advance!
0 commentaires
Réponses (1)
Adam Hug
le 30 Juin 2015
Based on your question, I am assuming that you are trying to fit a discrete curve. This is a hard problem in general but you can obtain a reasonable solution by using the "lsqnonlin" function in the Optimization Toolbox. More information can be found here:
In the context of least squares, residual is a more sensible metric than standard deviation. You could calculate the R^2 metric for the fit using the residual returned from "lsqnonlin".
0 commentaires
Voir également
Catégories
En savoir plus sur Linear and Nonlinear Regression 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!