资源简介
滑动时间的MATLAB程序实现,里面包括了两个窗口大小的设置
代码片段和文件信息
%-----滑动时间窗滤波/两种窗口大小
function [b_w s_w] = stw(X);
A = X;
[hd] = size(A);
%----大窗口
for i = 1:d
c = A(:i);
mn(1) = c(1);
mn(2) = c(1)/2 + c(2)/2;
mn(3) = c(1)/3 + c(2)/3 + c(3)/3;
mn(4) = c(1)/4 + c(2)/4 + c(3)/4 + c(4)/4;
mn(5) = c(1)/5 + c(2)/5 + c(3)/5 + c(4)/5 + c(5)/5;
mn(6) = c(1)/6 + c(2)/6 + c(3)/6 + c(4)/6 + c(5)/6 + c(6)/6;
mn(7) = c(1)/7 + c(2)/7 + c(3)/7 + c(4)/7 + c(5)/7 + c(6)/7 + c(7)/7;
mn(8) = c(1)/8 + c(2)/8 + c(3)/8 + c(4)/8 + c(5)/8 + c(6)/8 + c(7)/8 + c(8)/8;
mn(9) = c(1)/9 + c
评论
共有 条评论