How do I curve fit the data set
古いコメントを表示
Hello all,
I'm facing difficulty in fitting the data.

The red ones are from the data set, and I want to fit that as like blue one (Experimental Data). How can I do that. I have also attached the data set for your reference.
Thank You.
2 件のコメント
Sam Chak
2023 年 7 月 29 日
Can you also suggest some candidate functions for fitting into the red data? Look up some Kernel functions.
Red data seems to have discontinuities at multiple intervals. Is it acceptable to have a piecewise function to fit the data?
Prajwal Magadi
2023 年 7 月 29 日
採用された回答
その他の回答 (1 件)
Alex Sha
2023 年 7 月 29 日
@Prajwal Magadi, one more function:

Sum Squared Error (SSE): 75571.6557870726
Root of Mean Square Error (RMSE): 2.74902993412354
Correlation Coef. (R): 0.962878352853849
R-Square: 0.927134722394541
Parameter Best Estimate
--------- -------------
y0 3.57509887406416
a 10210313.7484567
xc 17.1109591760412
w1 18.7010167618592
w2 -1.38399464317597
w3 -1.49504622174935

3 件のコメント
Can you advise how you selected the candidate as the product of the logistic function and its scaled reflection?
By the experience of seeing hundreds of different single-hump skewed distribution functions?
x = linspace(-10, 20, 30001);
y1 = 1./(1 + exp(- (x - 1)));
y2 = 1 - 1./(1 + exp(- (x - 1)/5));
y = y1.*y2;
plot(x, y1, 'linewidth', 2, 'color', '#7c98c3'), hold on
plot(x, y2, 'linewidth', 2, 'color', '#e5ab45'),
plot(x, y, 'linewidth', 2, 'color', '#abc564'), grid on
xline(1, '-.', {'x = 1'})
legend('logistic fcn', 'scaled reflection', 'skewed fcn')
xlabel('x')
Alex Sha
2023 年 7 月 29 日
Hi, your data chart looks like peak-type function chart, so just try some typical peak functions, "Asym2Sig" function, shown above, gives more better outcomes.
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

