Ching Posted July 23, 2016 Report Share Posted July 23, 2016 clc clear close all fs = 1024; n = 1024; t = 0:1/fs:(n-1)/fs; y = sin(2*pi*50*t) + 0.4*cos(2*pi*150*t); figure,plot(y) set(gca,'xlim',[0,1024]) imf = emd(y); plot_hht_3d(imf,1024,1024,[-60,50]) 函数参数分别为: imf:emd分解后的结果 numfreq:划分的频率个数 fs:采样频率 ANGLE:视图角度 附录: function plot_hht_3d(imf,numfreq,fs,ANGLE) if nargin<3 fs=1; ANGLE=[-37.5,30]; end if nargin<4 if size(fs,2)>1 ANGLE=fs; fs=1; else ANGLE=[-37.5,30]; end end N=size(imf,2); [A,f,tt]=hhspectrum(imf); [m,n]=size(f); MaxFreq=max(max(f)); MaxFreq=ceil(MaxFreq/0.5)*0.5; if nargin<2 numfreq=512; end df=linspace(0,MaxFreq,numfreq); Spectrum=zeros(numfreq,n); Temp=f; Temp=min(round((Temp/MaxFreq)*numfreq)+1,numfreq); for k=1:m for u=1:n Spectrum(Temp(k,u),u)=Spectrum(Temp(k,u),u)+A(k,u); end end df=df*fs; figure clf mesh(tt,df,Spectrum); set(gca,'XLim',[0,N]); xlabel('采样点数/n'); if fs==1 ylabel('归一化频率'); else ylabel('频率/Hz'); end zlabel('幅值'); title('三维联合时频图'); colormap jet; shading interp; view(ANGLE(1),ANGLE(2)); set(gca,'YLim',[0,fs/2]); end Quote Link to comment Share on other sites More sharing options...
DrD Posted July 23, 2016 Report Share Posted July 23, 2016 This has limited value to those who do not read Oriental characters. What is HHT? DrD Quote Link to comment Share on other sites More sharing options...
Ching Posted July 25, 2016 Author Report Share Posted July 25, 2016 sorry, i will revise it if you need. HHT is means Hilbert-Huang Transform, which was proposed by Huang in 1998, NASA, US. Quote Link to comment Share on other sites More sharing options...
DrD Posted July 25, 2016 Report Share Posted July 25, 2016 Dear Ching, I have no need for this personally, but if it is worth posting, it must be worth posting where a reader can understand it. In this case, since this is an English language site, that means putting it all in English. What is the value of the Hilbert-Huang transform? What sort of problems and solution processes call for it? There is a lot more you could say that would make your note more interesting and of greater value. DrD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.