?? examp_phaseplot.m
字號:
%EXAMP_PHASEPLOT Give examples of nice phaseplots
%
% This script creates a synthetic signal and then uses 'phaseplot' on it,
% using several of the possible options
%
% For real-life signal only small parts should be analyzed. In the chosen
% example the fundamental frequency of the speaker can be nicely seen.
%
% FIGURE 1 Synthetic signal
%
% Compare this to the pictures in reference 2 and 3. In
% the first two figures a synthetic signal is analyzed. It consists of a
% sinusoid, a small Delta peak, a periodic triangular function and a
% Gaussian. In the phaselocked version in the first part the periodicity
% of the sinusoid can be nicely seen also in the phase coefficients. Also
% the points of discontinuities can be seen as asymptotic lines approached
% by parabolic shapes. In the third part both properties, periodicity and
% discontinuities can be nicely seen. A comparison to the spectogram shows
% that the rectangular part in the middle of the signal can be seen by the
% phase plot, but not by the spectogram.
%
% In the not phase-locked version still the fundamental frequency of the
% sinusoid can be guessed as the position of an horizontal asymptotic line.
%
% FIGURE 2 Synthetic signal, thresholded.
%
% This figure shows the same as Figure 1, except that values with low
% magnitude has been removed.
%
% FIGURE 3 Speech signal.
%
% The figure shows a part of the 'linus' signal. The fundamental
% frequency of the speaker can be nicely seen.
%
% REFERENCES:% R. Carmona, W. Hwang, and B. Torrésani. Multiridge detection and% time-frequency reconstruction. IEEE Trans. Signal Process., 47:480-492,% 1999.% % R. Carmona, W. Hwang, and B. Torrésani. Practical Time-Frequency Analysis:% continuous wavelet and Gabor transforms, with an implementation in S,% volume 9 of Wavelet Analysis and its Applications. Academic Press, San% Diego, 1998.% % A. Grossmann, M. Holschneider, R. Kronland-Martinet, and J. Morlet.% Detection of abrupt changes in sound signals with the help of wavelet% transforms. Inverse Problem, pages 281-306, 1987.
disp('Type "help examp_phaseplot" to see a description of how this example works.');
tt=0:98;
f1=sin(2*pi*tt/33); % sinusoid
f2=zeros(1,100);
f2(50)=1; % delta-like
f3=triang(33).';
f4 = fftshift(pgauss(100)).';
f4 = f4/max(f4);
sig = 0.9*[f1 0 f2 f3 -f3 f3 f4];
figure(1);
subplot(3,1,1);
plot(sig);
title('Synthetic signal');
legend('off');
subplot(3,1,2);
phaseplot(sig);
title('Phaseplot of synthetic signal - standard version');
subplot(3,1,3);
phaseplot(sig,'phl')
title('Phaseplot of synthetic signal - phaselocked version');
colormap(jet);
figure(2);
subplot(3,1,1);
plot(sig);
title('Synthetic signal');
legend('off');
subplot(3,1,2);
phaseplot(sig,'thr')
title('Phaseplot of synthetic signal - threshold version');
subplot(3,1,3);
phaseplot(sig,'phl','thr')
title('Phaseplot of synthetic signal - phaselocked and threshold version');
colormap(jet);
figure(3);
f=linus();
f = f(4500:8000);
subplot(3,1,1);
plot(f);
axis tight;
title('Speech signal: linus');
legend('off');
subplot(3,1,2);
phaseplot(f,'phl')
title('Phaseplot of linus - phaselocked version');
subplot(3,1,3);
phaseplot(f,'phl','thr')
title('Phaseplot of linus - phaselocked and threshold version');
colormap(jet);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -