How to find the x value from cumsum
이전 댓글 표시
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)?
채택된 답변
추가 답변 (3개)
Jan
2012년 12월 21일
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');
카테고리
도움말 센터 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!