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

조회 수: 3 (최근 30일)
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 CenterFile Exchange에서 Time-Frequency Analysis에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by