我在用间接法计算PSD的时候为何,输出报错啊?。

我的代码如下:
Fs=100000;
xn=IVtSampling3PMOSVGS1;
nfft=1024;
cxn=xcorr(xn,'unbiased');
CXk=fft(cxn,nfft);
Pxx=abs(CXk);
index=0:round(nfft/2-1);
k=index*Fs/nfft;
plot_Pxx=10*log10(Pxx(index+1));
plot(k,Pxx);

 採用された回答

0 投票

plot(k,plot_Pxx)才对,Pxx和k长度不一样

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!