What's the link between the size of XData and the original graphic?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Juan Carlos Pérez Novoa
el 8 de Mzo. de 2022
Respondida: Jan
el 8 de Mzo. de 2022
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.
0 comentarios
Respuesta aceptada
Jan
el 8 de Mzo. de 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.
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!