Azzera filtri
Azzera filtri

Recalibrating axis of graph automatically generated by Matlab

2 visualizzazioni (ultimi 30 giorni)
I used the PSD function(Eg: psd ECG) to generate the PSD of an ECG signal. The x axis was the normalized frequency and the y-axis the amplitude in dB.
I want to recalibrate the axis so that it shows the frequency in Hertz and the amplitude in mV. How can I do this? If I had written my own PSD fuction then while plotting I could have calibrated the axis according to my requirements.
The problem here is that I am using a pre-defined function to calculate the PSD. So, matlab automatically generates the graph to show freq in a normalized form.
I want to be able to edit the figure so I have the frequency in Hertz. How do i do it.?

Risposte (1)

Walter Roberson
Walter Roberson il 12 Ott 2012
fs = 8000; %sampling frequency
for H = findobj(gca, '-property', 'xdata')
set(h, 'XData', get(H, 'XData') * (2*fs));
I do not happen to recall the conversion between dB and mV, but once you know that you can use code similar to the above.


Scopri di più su Colormaps in Help Center e File Exchange


Non è stata ancora inserito alcun tag.

Community Treasure Hunt

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

Start Hunting!

Translated by