How to get original values from cumulative sum values?
조회 수: 22 (최근 30일)
이전 댓글 표시
I have a list of cumulative sum values. I want to obtain another list with the values that generated the cumulative sum vaues. Something like a reverse cumulative sum process. I tried (X2-X1) formula for each consecutive value but couldn't get the exact values. Can someone please help me to reverse the cumulative sum values to original values.
Thank you
댓글 수: 0
채택된 답변
Stephen23
2022년 6월 19일
X = rand(1,9)
Y = cumsum(X)
Z = [Y(1),diff(Y)]
max(X-Z) % alomsot zero
Because of the accumulated floating point error getting exactly the same values is not expected.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!