www.pudn.com > voiceprocessingtoolbox.rar > fft03.m


% 同 fft02.m,但以單邊頻譜來顯示 
N = 256;			% 點數 
fs = 8000;			% 取樣頻率 
freqStep = fs/N;		% 頻域的頻率的解析度 
f = 10.5*freqStep;		% 正弦波的頻率,不是 freqStep 的整數倍 
time = (0:N-1)/fs;		% 時域的時間刻度 
signal = cos(2*pi*f*time);	% Signal to analyze 
[mag, phase, freq]=fftOneSide(signal, fs, 1);