From: Mehmet Demirtas on 25 Apr 2010 13:56 Hi all, I have a signal vector (Fase1vuoto1) with length(Fase1vuoto1). I would like to obtain power/frequency 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); figure(1) plot(Hpsd) I need to obtain all frequency values in a vector and Power/frequency values in another vector...
From: Mehmet Demirtas on 25 Apr 2010 15:24 "Mehmet Demirtas" <karakartal2000(a)hotmail.com> wrote in message <hr1vnk$78f$1(a)fred.mathworks.com>... > Hi all, > > I have a signal vector (Fase1vuoto1) with length(Fase1vuoto1). I would like to obtain power/frequency 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); > > figure(1) > plot(Hpsd) > > I need to obtain all frequency values in a vector and Power/frequency values in another vector... No ideas at all?
|
Pages: 1 Prev: Banknote Classifier Next: for loop combined with if loop.. (new to matlab) |