Fitting of parameters of function with discrete / integer argument

4 次查看(过去 30 天)
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!

回答(1 个)

Adam Hug
Adam Hug 2015-6-30
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".

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by