📄 waveletpacket.txt
字号:
fs=16*1024;
fid=fopen('37h16K.dat','r');
begin=48;%表示用于分析的数据起始点(对于往复压缩机,用本实验室采集的振动数据,第48个及以后数据为振动);而47及以前为文件头,故begin应≥48.
N=1225+begin;
xdata=fread(fid,N,'int16');
VibrationData=xdata((begin+1):N);fclose(fid);
VibrationData=(VibrationData-mean(VibrationData))/std(VibrationData,1);
figure(1);
plot(1:1225,VibrationData);
xlabel('时间t/N');
ylabel('电压')
wpt=wpdec(VibrationData,3,'db1','shannon');
%plot(wpt);
s230=wprcoef(wpt,[3,0]);
s231=wprcoef(wpt,[3,1]);
s232=wprcoef(wpt,[3,2]);
s233=wprcoef(wpt,[3,3]);
s234=wprcoef(wpt,[3,4]);
s235=wprcoef(wpt,[3,5]);
s236=wprcoef(wpt,[3,6]);
s237=wprcoef(wpt,[3,7]);
s20=norm(s230);
s21=norm(s231);
s22=norm(s232);
s23=norm(s233);
s24=norm(s234);
s25=norm(s235);
s26=norm(s236);
s27=norm(s237);
st20=std(s230);
st21=std(s231);
st22=std(s232);
st23=std(s233);
st24=std(s234);
st25=std(s235);
st26=std(s236);
st27=std(s237);
disp('故障信号的特征向量');
snorm2=[s20,s21,s22,s23,s24,s25,s26,s27];
std2=[st20,st21,st22,st23,st24,st25,st26,st27];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -