How can I convert the units of the y-axis into miliseconds^2/Hz in power spectral density analysis of an ECG signal?
6 views (last 30 days)
Show older comments
This is the code that plots the PSD in dB/Hz on the y-axis
nfft = 2^nextpow2(length(ecg));
Pxx = abs(fft(ecg,nfft)).^2/length(ecg)/fs;
Hpsd= dspdata.psd(Pxx(1:length(Pxx)/2),'fs',fs);
p = plot(Hpsd);
0 Comments
Accepted Answer
Wayne King
on 26 Nov 2012
Edited: Wayne King
on 26 Nov 2012
The y-axis on a PSD estimate will not be in units of the time squared, it will be in amplitude squared per Hz, so for an ECG signal I assume that will be in millivolts, not milliseconds. The recorded values of the waveform are not in time.
Since you are using dspdata.psd, why not just use spectrum.periodogram?
psdest = psd(spectrum.periodogram,ecg,'NFFT',length(ecg),'Fs',fs);
plot(psdest)
If you want to plot without using dB (that is preferred by the way)
plot(psdest.Frequencies,psdest.Data)
1 Comment
Aakash Mahawar
on 10 May 2014
u r wrong wayne king.....when psd estimate of an ECG signal is done....then y axis wud be ms^2/Hz.since it belongs to psd of RR time series.
More Answers (0)
See Also
Categories
Find more on Parametric Spectral Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!