electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

PSD calculation using Matlab{help needed}


Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> PSD calculation using Matlab{help needed}
Author Message
qslazio



Joined: 23 May 2004
Posts: 194
Helped: 9


Post07 Oct 2006 14:08   

calculate psd


I'm writing a Matlab m-file to calculate PSD of sinusoid signal.
However the output puzzle me a lot.

Below is the m-file:
------------------------------------------------------------------
fs =1e10;
fi =1e8;
amp =1;
nbpts =4e5;
t =[0:1/fs:nbpts/fs];
sig =amp*sin(2*pi*fi*t);
Hs = spectrum.periodogram('rectangular');
Hdsp2 = psd(Hs,sig,'Fs',fs,'NFFT',nbpts,'SpectrumType','onesided');
Pow = avgpower(Hdsp2,[0.9*fi,1.1*fi]);
plot(Hdsp2);

------------------------------------------------------------------


Here, I intended to calculate psd of this sinusoid of which the frequency is 100Meg Hz and amplitude is 1. I expected to see this 0.5*δ(w-100Meg) impulse on this one-sided PSD plot.
But instead, there is a impulse of which the amplitude is around -50dB, which I cannot explain it at all.

Can anyone tell me what's wrong with the m-file?
Thank in advance!!
Back to top
Google
AdSense
Google Adsense




Post07 Oct 2006 14:08   

Ads




Back to top
lassmat



Joined: 03 Sep 2006
Posts: 41
Helped: 2


Post20 Oct 2006 23:14   

psd calculation


There is function in matlab call psd().This will calculate the psd of any signal you pass to it and plot it.Try help psd and will get all the details.You can even check the code of that function.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> PSD calculation using Matlab{help needed}
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
help needed::audio compression (DCT) using matlab (2)
help needed in analysis of ECG Signal using MATLAB (39)
Help with calculation of IFFT in Matlab (1)
Matlab embeded PSD function (4)
matlab psd function and QAM (1)
plot white noise PSD in matlab? (3)
Help with Calculation of T and R Spectra using Fullwave (1)
help needed in current consumption calculation (4)
how to estimate the PSD of a complex signal in MATLAB (1)
MATLAB code for PSD plot and SNR of Sigma Delta Modulators (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS