疑惑
我在运行EMD程序中文详解及应用例子::@) clear
rand('seed', 0);
T = 0.05; % 仿真时间
R = 500; % 码速率
fd = 1000; % 载波频差
fc = 2000; % 载波频率
fs = 20000; % 采样率
samp = fs/R; % 每个码元上的采样点数
N = T*fs;
n = 1:N;
x = randint(1, R*T, 2);
y = fskmod(x, 2, fd, samp, fs);
y = y .* exp(i*2*pi*fc/fs*n);
y = real(y);
% z = awgn(y, 20, 'measured');
z = y;
imf = emd(z);
= hhspectrum(imf);
if size(imf,1) > 1
= hhspectrum(imf(1:end-1, :));
else
= hhspectrum(imf);
end
= toimage(A,fa,tt,length(tt));
for k = 1:size(E,1)
bjp(k) = sum(E(k,:))*1/fs*1/T;
end
f = (0:N-3)/N*(fs/2);
figure(1)
plot(z);
figure(2)
imagesc(tt1,,E);
set(gca,'YDir','normal')
% 使用灰度图显示
% colormap(flipud(gray))
figure(3)
plot(f, bjp);
中为什么总出现这样的错误?:@L
??? Undefined function or method 'instfreq' for input arguments of type 'double'.
Error in ==> hhspectrum at 79
f(i,:)=instfreq(an(i,:)',tt,l)'
页:
[1]