How to find the x value from cumsum
Mostrar comentarios más antiguos
Hi, I plotted a cumulative sum in Matlab. Is there any where for me to get the value of x from the plot(value of y is known)?
Respuesta aceptada
Más respuestas (3)
Jan
el 21 de Dic. de 2012
It depends on what you exactly want...
Actually the X-values are trivial:
data = rand(1, 100);
y = cumsum(data);
lineH = plot(y);
% Now the X-values are:
x = 1:numel(y);
% You can obtain them explicitly:
x2 = get(lineH, 'XData');
Azzi Abdelmalek
el 21 de Dic. de 2012
x=1:10
y=cumsum(x)
% for y=15
x0=x(find(y==15))
1 comentario
K
el 21 de Dic. de 2012
K
el 21 de Dic. de 2012
0 votos
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!