What's the link between the size of XData and the original graphic?

3 vues (au cours des 30 derniers jours)
I'm creating a graphic from a function that draws the Spectral Power Density of a signal, and going from there, I input the following code to extract the info.
ax = gca
h = findobj(gca, 'Type', 'line');
x= h.XData;
y = h.YData
The graph in question is this one:
And I'm trying to figure out why x and y have a size of 1025, when the graph has a length of over 2x10^4. I would like to know this so that, independently of the audio signal that I'm working with, I'll know with certainty what the size of x and y will be, so that I can get the peaks from there, since I can't assign the SPD to a variable if I'm supposed to use the function that I was given, because it has no outputs.
Thanks in advance.

Réponse acceptée

Jan
Jan le 8 Mar 2022
The values of the line have a range until 22028.5, which is the "2x10^4". The number of values can be 1025.
This means, that the XData are the values of the x component.

Plus de réponses (0)

Catégories

En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by