Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Power Spectral Density - Matlab

Status
Not open for further replies.

memeth

Newbie level 5
Newbie level 5
Joined
Apr 17, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Milano, Italy
Visit site
Activity points
1,348
Hi all,

I have a signal vector (Fase1vuoto1) with length(Fase1vuoto)... I would like to obtain power values of each frequency component. I used Hpsd=dspdata.psd(...) function and i can obtain the Frequency versus Power/frequency plot. But, i need them in two different vectors. How can i obtain such vectors one for frequency, one for power/frequency.

Fs=5000;

nfft=2^nextpow2(length(Fase1vuoto1));
Pxx=abs(fft(Fase1vuoto1,nfft)).^2/length(Fase1vuoto1)/Fs;

% Create a one-sided spectrum
Hpsd=dspdata.psd(Pxx(1:length(Pxx)/2),'SpectrumType','Onesided','Fs',Fs);



By the way, what is the benefit in using "one-sided" or "two-sided" spectrum? I think "two-sided" is the logical one. But i am confused...

figure(1)
plot(Hpsd)

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top