共享一个实用的一维信号平滑滤波方法五点三次平滑滤波-x.dat
test.jpg
各种循环次数下的结果图
clear all
close all
clc
V1 = rand*700 200;
subplot 231; plot; ylim; grid;
y=mean5_3;
subplot 232; plot; ylim; grid;
y=mean5_3;
subplot 233; plot; ylim; grid;
y=mean5_3;
subplot 234; plot; ylim; grid;
y=mean5_3;
subplot 235; plot; ylim; grid;
y=mean5_3;
subplot 236; plot; ylim; grid;
%------------------------------------------------------------
function y = mean5_3
% x为被处理的数据
% m 为循环次数
n=length;
a=x;
for k=1: m
b = 4* a) -6*a -a) /70;
b = a) 27*a 12*a -8*a) /35;
for j=3:n-2
b = a) 12* a) 17*a) /35;
end
b = a) 27*a 12*a -8*a) /35;
b = 4* a) -6*a -a) /70;
a=b;
end
y =a;
2021-11-04 19:23:00
124KB
matlab
1