6-7.m

来自「MATLAB的部分源代码,与MATLAB数字信号处理与应用一书相配套」· M 代码 · 共 22 行

M
22
字号
%例程6-7  方波信号的连续小波变换
% e.g.6-7.m for example6-7;
%test the function of cwt
 
clear all;
t=0:.01*pi:10*pi;
x=square(t,80); %The duty cycle(占空比) is 80% of the period in which the signal is positive. 
X=x+randn(size(x))/10;   
subplot(211); plot(t,X);
xlabel('Time t');
axis([0 11*pi  -2 2]);
ylabel('Amplitude X');
title('Analyzed singal ')
 
% Perform continuous wavelet transform by db4 at all integer scales from 1 to 16. 
subplot(212);
c=cwt(X,1:16, 'db4','plot');
title('Continuous Wavelet Transform of X');
colormap(pink(64)); 
xlabel('time (or space) b');
ylabel('Scale');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?