What is the best smoothing procedure to calculate differentials for a large number of data points (x,y)?
조회 수: 1 (최근 30일)
이전 댓글 표시
There is a set of data (X,Y) independently obtained from an experiment. Plotting Y vs X looks like this. There are ~114000 data points.
Upon zooming in, you can see the scatter in the data. Because of this when the slope (instantaneous differential) is calcultaed using diff(Y)./diff(X), the scatter is magnified and the trend I'm looking for is completely lost.
For now, I used an arbitratry smoothing procedure using moving average to somewhat acquire the trend I'm looking for, which looks like this:
Could someone please suggest a more standard procedure that I could employ that would be statistically accurate? I have attached the dataset (X,Y).
댓글 수: 0
답변 (1개)
Bruno Luong
2022년 8월 6일
편집: Bruno Luong
2022년 8월 6일
The Savitzky-Golay filter (moving polynomial fit) is a good filter that preserves decendly the slope.
There is a similar thread discussed not long ago, in short you fit data with appropriate model/tools 'depending on the characteristic of you data); then take the derivative of the model.
load('example.mat')
pp=BSFK(X,Y); %FEX file
pp1=ppder(pp);
xq=linspace(min(X),max(X),513);
ydq=ppval(pp1,x)
plot(xq,ydq)
참고 항목
카테고리
Help Center 및 File Exchange에서 Smoothing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!