How can I fit expected curve?

47 Views Asked by At

I got a few scattered points and try to fit a smooth curve, but the fitted curve is not expected.
enter image description here
enter image description here
In the first figure, the red curve is generated by the function csaps from matlab and is not smooth enough.
csaps means cubic smoothing spline from the link https://www.mathworks.com/help/curvefit/csaps.html
I fit the curve again using the corresponding points on the curve of measured points for several times and obtain the cyan curve. The cyan curve is still not as I expect. The second figure is what I expect. How can I get such curve?