作者hopeandhmm (......)
看板MATLAB
標題[其他] 想請教auto-correlation與power spectrum
時間Fri Apr 27 17:24:55 2012
想請教一下
我想畫在頻域上是一個高斯波的auto-correlation與它的power spectrum
以下是我的程式碼
f=linspace(3.4*10^12,3.6*10^12,1024); %%頻率軸
x= 1/(sqrt(1000)*sqrt(2*pi))*exp(-((((f/7/10^12)*10-5)).^2/2*sqrt(1000)^2));
%%高斯波
y=xcorr(x); %%autocorrelation
delta=(3.6*10^12-3.4*10^12)/1024;%%取一個延遲的頻率
r=1/delta;%%取一個延遲的時間
g=(-1023:1023)*r;%%autocorrelation的時間延遲軸
v=fftshift(fft(y));
想請教大家
第一個問題是我的auto-correlation的時間延遲軸計算方式是正確的嗎
第二個問題是我要怎麼計算power spectrum的頻率軸
謝謝大家
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.92.238