
本文共 2921 字,大约阅读时间需要 9 分钟。
������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������MATLAB���������������
���������������������������������
������������������������Moving Average Filter���MA Filter���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������N���������������������N���������������������������������
������������������
Java������
Java������������������������������������������������������
- ���������������������������������������������������������
- ������������������������������������������������������������������������������������
- ������������������������������������������������������������������������������������������������������
���������������
public static float[] MovingAverageFilter_NP(float[] InputSig) { int length = InputSig.length; float[] dbRt = new float[length]; dbRt[0] = InputSig[0]; for (int x = 1; x < length -1; x++) { dbRt[x] = (InputSig[x -1] + InputSig[x] + InputSig[x+1]) / N; } dbRt[length-1] = InputSig[length-1]; return dbRt;}
MATLAB������
MATLAB������������������������������������������������������
- ���������������������������������������
- ������������������������������������������������������������
- ������������������������������������������������
���������������
out_y = smooth(T1, 6, 'moving');sound(out_y, Fs);figure;plot(out_y);
���������������������������������
���������������������������������������������������������������������MATLAB���������������������������������������
% ������������������info = audioinfo('1.mp3');[y, Fs] = audioread('1.mp3');T = y; % ���������% ������������������������N = 10;% ������������������for i = 1: length(T) if i + N - 1 > length(T) break else W = T(i:N+i-1); mu = mean(W); T1(i) = mu; endend% ������������������sound(T1, Fs);% ������������������figure;plot(T);title('���������');ylabel('���������');xlabel('������');figure;plot(T1);title('���������������');ylabel('���������');xlabel('������');
���������������������
������������������������������������������������������
out_y = smooth(T1, 6, 'moving'); % ���������������6sound(out_y,Fs);figure;plot(out_y);
������������
������������������������������������������������������������������������������������������������������������������������������������������Java���MATLAB������������������������������������MATLAB��� smooth
������������������������������������������������������������������������������������������������������������������������������������������������������������������
发表评论
最新留言
关于作者
