資源簡介
用MATLAB編寫幾個(gè)程序幫助理解DFT算法,同時(shí)實(shí)現(xiàn)對(duì)兩路含有諧波或者含有高斯白噪聲的信號(hào)進(jìn)行相位差計(jì)算。 文件包括harmonic_wave_polluted_multiple_phase_difference.m
complete_uncomlete_cycles_sampling.m
polluted_multiple_phase_difference.m
noise_polluted_multiple_phase_difference.m
noise_with_different_SRN.m

代碼片段和文件信息
clc;
clear;
clf;
f0=10;
fs=128;
k1=0:63;????????%整周期采樣
k2=0:60;????????%非整周期采樣
x1=cos(2*pi*k1*f0/fs);?
x2=cos(2*pi*k2*f0/fs);?
X1=fft(x1);
X2=fft(x2);
subplot(121);
stem(fs*k1/length(k1)abs(X1)/length(k1));
axis([0?128?0?1?])
title(‘integral?period?sampling‘)
xlabel(‘frequence?Hz‘)
ylabel(‘normalized?amplitude‘)
grid?on;
subplot(122);
stem(fs*k2/length(k2)abs(X2)/length(k2));??????%normalize?the?amplitude?by?length(k2)
axis([0?128?0?1?])
title(‘non?integral?period?sampling‘)
xlabel(‘frequence?Hz‘)
ylabel(‘normalized?amplitude‘)
grid?on;
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????2976??2013-02-22?21:09??harmonic_wave_polluted_multiple_phase_difference.m
?????文件????????2440??2013-01-30?18:03??multiple_phase_difference.m
?????文件????????2729??2013-02-23?09:35??noise_polluted_multiple_phase_difference.m
?????文件????????2612??2013-02-23?10:20??noise_with_different_SRN.m
?????文件????????2565??2013-01-30?11:06??polluted_multiple_phase_difference.m
?????文件?????????587??2013-02-22?21:04??complete_uncomlete_cycles_sampling.m
評(píng)論
共有 條評(píng)論