資源簡介
在使用MATLAB進行譜分析時可以用周期圖法也可以用相關圖法,這個代碼對這兩個方法進行了比較仿真,發現結果相差不大。基本相同。
代碼片段和文件信息
t=0:99;
x=cos(4*pi*t/15)-0.8*sin(pi*t/30);
subplot(221);
stem(tx);
x1=conj(x);%共軛
r1=0;
for?n=0:99
????for?t=0:99-n
????????x2=cos(4*pi*(t+n)/15)-0.8*sin(pi*(t+n)/30);
????????r1=r1+x1.*x2;
????end
????r2=r1/100;
end
for?n=1:99
????r3=conj(r2);
end
r4=fliplr
評論
共有 條評論