??? Error using ==> instfreq
T can not be equal to 1 neither to the last element of X
Error in ==> hhspectrum at 45
f(i,:)=instfreq(an(i,:)',tt,l)';
Error in ==> Untitled at 17
[A,f,tt]=hhspectrum(imf);
还有上面这个错误提示,我也不知道怎么回事。下面是hhspectrum的内容,instfreq程序是在网上下的,应该没问题
%inputs:
% - imf : matrix with one IMF per row
% - t : time instants
% - l : estimation parameter for instfreq
% - aff : if 1, displays the computation evolution
function [A,f,tt] = hhspectrum(imf,t,l,aff)
if nargin < 2
t=1:size(imf,2);
end
if nargin < 3
l=1;
end
if nargin < 4
aff = 0;
end
lt=length(t);
tt=t((l+1):(lt-l));
for i=1:(size(imf,1)-1)
an(i,:)=hilbert(imf(i,:)')';%%%%%%%
f(i,:)=instfreq(an(i,:)',tt,l)';
A=abs(an(:,l+1:end-l));%%%%%
[im,tt] = toimage(A,f(i,:));
disp_hhs(im,t,-20);
if aff
disp(['mode ',int2str(i),' trait?1?7'])
end
end |