continuity of a fit function in different regions

조회 수: 4 (최근 30일)
mohammad hadi
mohammad hadi 2019년 5월 21일
답변: Alex Sha 2020년 2월 23일
untitled.jpgI have probelm in continuity of a fitting of a function where I divided it to two regions the first region is linear and second one is quadratic where I'm using lsqcurvefit for fitting

답변 (3개)

Alex Sha
Alex Sha 2019년 5월 23일
Attach your data file please.

mohammad hadi
mohammad hadi 2019년 5월 23일
you can find the data in the attchment and I want to have the derivative of the function at x=1 to be zero.
thank you

Alex Sha
Alex Sha 2020년 2월 23일
Hi, the function below meets your requirements, with the derivative to be zero at x=1
y = p1+p2*(((x-p3)*(x+p4))^2)^p5;
Root of Mean Square Error (RMSE): 0.111454525338652
Sum of Squared Residual: 0.236020113150822
Correlation Coef. (R): 0.999608307854672
R-Square: 0.999216769132081
Adjusted R-Square: 0.999118865273591
Determination Coef. (DC): 0.999216769132081
Chi-Square: 0.322625091206584
F-Statistic: 4465.16963433769
Constrained Functions: p2*((p5*((((1-p3)*(1+p4))^2)^(p5-1)))*((2*((1-p3)*(1+p4)))*(1+p4+1-p3)))-0 = 0
Parameter Best Estimate
---------- -------------
p1 12.2679122419038
p2 -12.1133796289348
p3 1.00000000000003
p4 -0.999999999999971
p5 0.321345944716431

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by