How can I convert the units of the y-axis into miliseconds^2/Hz in power spectral density analysis of an ECG signal?

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);

 Accepted Answer

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

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.

Sign in to comment.

More Answers (0)

Asked:

on 26 Nov 2012

Commented:

on 10 May 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!