英语翻译% EMD_FMSIN.M%% P.Flandrin,Mar.13,2003 - modified Mar.2,2006%% computes and displays EMD for the sum of 2 sinusoidal % FM's + 1 Gaussian logon %% displays reassigned spectrograms of the sum signal and of % the 3 first modes extracted%% pr

来源:学生作业帮助网 编辑:作业帮 时间:2024/12/06 21:20:01

英语翻译% EMD_FMSIN.M%% P.Flandrin,Mar.13,2003 - modified Mar.2,2006%% computes and displays EMD for the sum of 2 sinusoidal % FM's + 1 Gaussian logon %% displays reassigned spectrograms of the sum signal and of % the 3 first modes extracted%% pr
英语翻译
% EMD_FMSIN.M
%
% P.Flandrin,Mar.13,2003 - modified Mar.2,2006
%
% computes and displays EMD for the sum of 2 sinusoidal
% FM's + 1 Gaussian logon
%
% displays reassigned spectrograms of the sum signal and of
% the 3 first modes extracted
%
% produces Figure 1 in
%
% G.Rilling,P.Flandrin and P.Gon峚lv弑
% "On Empirical Mode Decomposition and its algorithms"
% IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing
% NSIP-03,Grado (I),June 2003
N = 96;% # of data samples
T = 1:4:N;
t = 1:N;
x=load('PA530.txt');
% p = N/2;% period of the 2 sinusoidal FM's
%
% % sinusoidal FM 1
% fmin1 = 1/64;% min frequency
% fmax1 = 1.5*1/8;% max frequency
% x1 = fmsin(N,fmin1,fmax1,p,N/2,fmax1);
%
% % sinusoidal FM 1
% fmin2 = 1/32;% min frequency
% fmax2 = 1.5*1/4;% max frequency
% x2 = fmsin(N,fmin2,fmax2,p,N/2,fmax2);
%
% % logon
% f0 = 1.5*1/16;% center frequency
% x3 = amgauss(N,N/2,N/8).*fmconst(N,f0);
%
% a1 = 1;
% a2 = 1;
% a3 = 1;
%
% x = real(a1*x1+a2*x2+a3*x3);
% x = x/max(abs(x));
[imf,ort,nbits] = emd(x);
emd_visu(x,t,imf,1);
figure(1)
% time-frequency distributions
Nf = 256;% # of frequency bins
Nh = 127;% short-time window length
w = tftb_window(Nh,'Kaiser');
[s,rs] = tfrrsp(x,T,Nf,w,1);
[s,rs1] = tfrrsp(imf(1,:)',T,Nf,w,1);
[s,rs2] = tfrrsp(imf(2,:)',T,Nf,w,1);
[s,rs3] = tfrrsp(imf(3,:)',T,Nf,w,1);
figure(4)
subplot(221)
imagesc(flipud(rs(1:128,:)))
set(gca,'YTick',[]);set(gca,'XTick',[])
xlabel('time')
ylabel('frequency')
title('signal')
pause
subplot(222)
imagesc(flipud(rs1(1:128,:)))
set(gca,'YTick',[]);set(gca,'XTick',[])
xlabel('time')
ylabel('frequency')
title('mode #1')
pause
subplot(223)
imagesc(flipud(rs2(1:128,:)))
set(gca,'YTick',[]);set(gca,'XTick',[])
xlabel('time')
ylabel('frequency')
title('mode #2')
pause
subplot(224)
imagesc(flipud(rs3(1:128,:)))
set(gca,'YTick',[]);set(gca,'XTick',[])
xlabel('time')
ylabel('frequency')
title('mode #3')
越具体越好、

英语翻译% EMD_FMSIN.M%% P.Flandrin,Mar.13,2003 - modified Mar.2,2006%% computes and displays EMD for the sum of 2 sinusoidal % FM's + 1 Gaussian logon %% displays reassigned spectrograms of the sum signal and of % the 3 first modes extracted%% pr
除去加上%的部分,具体的就是如下的一些代码:
(从代码可得,主要是实现几个图的绘制,所以楼主可以多看看绘图的东西即可)
N = 96;% 样本个数
T = 1:4:N;%T的取值从1开始以步长为4的增长,并以N为上限
t = 1:N; %t的取值从1到N,步长为1的增长.补充:默认情感下,步长为1
x=load('PA530.txt');%加载名为PA530的文本到x中保存
[imf,ort,nbits] = emd(x);%调用emd函数,其中emd的输入参数为x,输出参数为三个,分别为imf,ort,nbits.具体是什么意思还得看你的具体实现.
emd_visu(x,t,imf,1); %这里应该也是调用emd_visu的一个函数,没有返回值
figure(1) %创建画图窗口.
% time-frequency distributions
Nf = 256;% # of frequency bins
Nh = 127;% short-time window length
w = tftb_window(Nh,'Kaiser'); %同样是函数调用
[s,rs] = tfrrsp(x,T,Nf,w,1);
[s,rs1] = tfrrsp(imf(1,:)',T,Nf,w,1);
[s,rs2] = tfrrsp(imf(2,:)',T,Nf,w,1);
[s,rs3] = tfrrsp(imf(3,:)',T,Nf,w,1);
figure(4) %创建画图窗口.
subplot(221) %将图4画图窗口分为2x2的四个小窗口,并将图画在第一个小窗口中
imagesc(flipud(rs(1:128,:))) %imagesc画图函数的调用
set(gca,'YTick',[]);set(gca,'XTick',[]) %设置YTick和XTick的值为空
xlabel('time') %横坐标名称的设置
ylabel('frequency') %纵坐标名称的设置
title('signal') %图片标题的设置
pause %暂停
subplot(222) %在图4的第2个小窗口中绘图
imagesc(flipud(rs1(1:128,:))) %绘图函数的调用,进行具体绘图的实现
set(gca,'YTick',[]);set(gca,'XTick',[]) %同上
xlabel('time')%同上
ylabel('frequency')%同上
title('mode #1') %同上
pause%同上
subplot(223)%在图4的第3个小窗口中绘图
imagesc(flipud(rs2(1:128,:)))%同上
set(gca,'YTick',[]);set(gca,'XTick',[])%同上
xlabel('time')%同上
ylabel('frequency')%同上
title('mode #2')%同上
pause%同上
subplot(224)%%在图4的第4个小窗口中绘图
imagesc(flipud(rs3(1:128,:)))%同上
set(gca,'YTick',[]);set(gca,'XTick',[])%同上
xlabel('time')%同上
ylabel('frequency')%同上
title('mode #3')%同上