clc
clear all
close all
% 定义输入信号
Ts = (1/512);
Fs = 1/Ts;
t=0:Ts:1;
v1 = 0.5*cos(2*20*pi*t);
v2 = cos(2*30*pi*t);
input = v1+v2;
% x = awgn(input,1);
x=input;
%绘制出入信号时域图
figure
plot(t,x);
grid on
xlabel('t');ylabel('x');title('初始信号');
legend('0.5cos(40x*pi)+cos(60x*pi)');
%求取本证模态函数imf并绘制其时图像及频谱
imf = emd(x);
plot_hht(x,imf,1/Fs);
[M,N]=size(imf); %模态数及模态长度
%计算相关系数并绘制
for i = 1:1:N
cc(i)=min(min(corrcoef(imf{i},x)));
end
figure
plot(cc,'-g<','LineWidth',1.5,'MarkerEdgeColor','b','MarkerFaceColor','b','MarkerSize',5);
set(gca,'XGrid', 'on', 'YGrid', 'on');
legend('CC');
经验模态分解
最新推荐文章于 2024-09-04 15:29:39 发布