赞
踩
下面是我的程序:
fid(1)=fopen('E:\论文资料\frequency analysis\样本\碰摩\碰摩1\datafile1.dat','r');
A=fread(fid(1),'uint16');
status=fclose(fid(1));
%for m=1:5
m=1;
%for k=1:20 %k为数据点数
k=1;
c=m+1+(k-1)*6144:12:6144+(k-1)*6144;%通道
B1=A(c);
for j=1:512
if (B1(j)>=32768) B(j)=B1(j)-32768;
else B(j)=B1(j)+32768;
end
end
F=B*0.000152590;
sig=0;
average=0;
sum1=0;
for i=1:512
sum1=sum1+F(i);
end
average=sum1/512;
sig=F-average;
sig=sig/0.08;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b=sig(1:512);
lev=5;
[thr,sorh,keepapp]=ddencmp('den','wv',b);%根据信号计算噪声强度,给出 全局
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。