Use "curve fitting" app, upload the data points and use smoothing curve option.
Basic fitting MATLAB: Fitting the data with approximate curve.
41 views (last 30 days)
I have plotted X-Y data using MATLAB (image on left in fig.), I have total 19300 data points which I got from experiments. I have used tools like "spline interpolant", "shape-preserving interpolat" etc to do basic fitting, but it does not satisfy my requirement. What I want is smooth curve which should look like red curve shown in figure (right fig.). Further, I also want to get information out of red curve, for example slope of the curve at various points on red curve. Can you please suggest me an appropriate tool for these two purposes. Thank you.
More Answers (1)
Chandramouli Gnanasambandham on 22 Sep 2015
Use the MATLAB built in function filter. vary the parameter window size to get better smoothness.
windowSize = 70;
b = (1/windowSize)*ones(1,windowSize);
out = filter(b,a,ydata);
hope this helps :)