Fitting of parameters of function with discrete / integer argument

조회 수: 5 (최근 30일)
Selwyn
Selwyn 2015년 6월 26일
답변: Adam Hug 2015년 6월 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