?? laugh.m
字號:
load laughter.mat % laughter data
y = y(1:1400);
sp = (y-mean(y))/std(y); % standardize
%
figure(1) % data and histograms:
subplot(211), plot(1:length(sp),sp),grid,
subplot(212), hist(sp), grid
% % summary stats:
c1 = mean(sp); c2 = cumest(sp,2);
c3 = cumest(sp,3) / c2^(3/2); c4 = cumest(sp,4) / c2^2;
fprintf(' Mean %g\n',c1);
fprintf(' Variance %g\n',c2);
fprintf(' Skewness (normalized) %g\n', c3);
fprintf(' Kurtosis (normalized) %g\n', c4);
figure(2), specgram(sp,512,8000,hamming(256),240);
% -------- power spectra and cum-4 spectra
figure(3), [px2,a21,a22]=harmest(sp,25,12,'biased',512,2);
figure(4), [px4,a41,a42]=harmest(sp,25,8,'biased',512,4);
r21 = roots(a21); r22 = roots(a22);
r41 = roots(a41); r42 = roots(a42);
figure(5)
subplot(221), polar(angle(r21), abs(r21), 'x'), grid
subplot(222), polar(angle(r22), abs(r22), 'x'), grid
subplot(223), polar(angle(r41), abs(r41), 'x'), grid
subplot(224), polar(angle(r42), abs(r42), 'x'), grid
glstat(sp,0.51,256); % gl test
% -------- bispectrum and diagonal slice
figure(6), [Blaf,w] = bispecd(sp,256,1,100,0);
figure(7), dB = abs(diag(Blaf));
plot(w,dB), grid, title('diagonal slice')
[loc,val] = pickpeak(dB,3)
disp(w(loc))
figure(8), qpctor(sp,25,10,512,100,0); % QPC test
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -