qinzhijin2525 发表于 2011-9-3 16:51

matlab中频域坐标值的确定问题

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%生成调制信号
fs=100;
%采样频率
fc=40;
%载频
fo=fs/20;
%码率
L=300;
%信号样本
t = (0:L-1)*1/fs;
xn=cos(8*pi*fc*t);         
y = xn + randn(size(t));   
figure(1)
plot(t,y)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%进行能量检测
NFFT = 2^nextpow2(L);
Y = fft(y,NFFT)/L;
f = fs/2*linspace(0,1,NFFT/2);
figure(2)
plot(f,2*abs(Y(1:NFFT/2)))
这段代码中,Y(1:NFFT/2)是什么意思?
为什么只有这样选区坐标才能检测出信号的存在?
由此问:在matlab的制图中,如何确定频域中坐标的间隔及最大值,才能画出想要的品与图形?

ChaChing 发表于 2011-9-4 00:03

Ref: [原创]关于FFT的频谱对应关系 http://forum.vibunion.com/thread-23614-1-1.html
...
页: [1]
查看完整版本: matlab中频域坐标值的确定问题