problem in sgolay filter

4 次查看(过去 30 天)
Hardikkumar  Bhalodiya
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 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by