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

3 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Jan
Jan am 8 Mär. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Time-Frequency Analysis finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by