PSD Power Spectral Density
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
PSD Power Spectral Density

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP
Author Message
JoseBioeng
Guest





Posted: Sat Dec 24, 2005 12:19 am    Post subject: PSD Power Spectral Density Reply with quote

Hi, I was reading some Matlab code in Matlab toolbox 'periodogram.m' an
'computepsd.m' and there are something that I cannt understand:
For 'onesided' calculation:
X=fft(x);
Pxx=abs(A).^2/length(A)/fs; %fs =sampling frequency.
%x is an even signal
Sxx=Pxx(1:nfft/2+1); %nfft is the number of samples in fft.
Sxx=[Sxx(1) 2*Sxx(2:end-1) Sxx(end)]; %WHAT 2 TIMES ONLY SAMPLES FROM 2 T
% END-1!!!!!!!!!

Ok, I will appreciate all kind of cooperation.
Thanks in advance.
JOSEBIOENG
Back to top
john
Guest





Posted: Sat Dec 24, 2005 1:15 am    Post subject: Re: PSD Power Spectral Density Reply with quote

JoseBioeng wrote:
Quote:
Hi, I was reading some Matlab code in Matlab toolbox 'periodogram.m' and
'computepsd.m' and there are something that I cannt understand:
For 'onesided' calculation:
X=fft(x);
Pxx=abs(A).^2/length(A)/fs; %fs =sampling frequency.
%x is an even signal
Sxx=Pxx(1:nfft/2+1); %nfft is the number of samples in fft.
Sxx=[Sxx(1) 2*Sxx(2:end-1) Sxx(end)]; %WHAT 2 TIMES ONLY SAMPLES FROM 2 TO
% END-1!!!!!!!!!

Ok, I will appreciate all kind of cooperation.
Thanks in advance.
JOSEBIOENG

Half of the power is implicit in the mirror-image negative frequencies.
The first and last bin (DC and Fs/2) don't have mirror images, all the
power is already contained in those bins.

John
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> DSP All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB