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

3 ビュー (過去 30 日間)
Juan Carlos Pérez Novoa
Juan Carlos Pérez Novoa 2022 年 3 月 8 日
回答済み: Jan 2022 年 3 月 8 日
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.

採用された回答

Jan
Jan 2022 年 3 月 8 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime-Frequency Analysis についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by