problem in sgolay filter
3 views (last 30 days)
Show older comments
I have a one problem in my script.
can anyone help me to solve this problem? I attached my script below.
thanks in advance for solving the problem
clc
clear all
dataset = xlsread('hardik.csv');
x = dataset(:,1);
a = dataset(:,2);
b = dataset(:,3);
c = dataset(:,4);
dMovingAverage = conv(a,ones(13,1)/13,'same');
dSavitzkyGolay = sgolayfilt(a,3,13);
subplot(2,2,1)
plot(x,a, ...
x,dMovingAverage, ...
x,dSavitzkyGolay)
xlabel('Seq No')
ylabel('Layer Thickness')
legend('original signal','moving average','Savitzky-Golay')
dMovingAverage = conv(b,ones(13,1)/13,'same');
dSavitzkyGolay = sgolayfilt(b,3,13);
subplot(2,2,2)
plot(x,b, ...
x,dMovingAverage, ...
x,dSavitzkyGolay)
xlabel('Seq No')
ylabel('Pressure Difference')
legend('original signal','moving average','Savitzky-Golay')
dMovingAverage = conv(c,ones(13,1)/13,'same');
dSavitzkyGolay = sgolayfilt(c,3,13);
subplot(2,2,3)
plot(x,c, ...
x,dMovingAverage, ...
x,dSavitzkyGolay)
xlabel('Seq No')
ylabel('Dust Concentration')
legend('original signal','moving average','Savitzky-Golay')
0 Comments
Answers (0)
See Also
Categories
Find more on Smoothing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!