Plot cummulative values without creating a cumulative vector with the values
Show older comments
I have a set of variables which represent the power output of several generators. I'm trying to obtain a plot in which the values are stacked on top of each other as seen in the following image, whitout the neccesity of creating another variable in which I make the cummulative sum.

Any idea which plot variation can achieve something similar to this?
Answers (2)
Star Strider
on 5 Apr 2022
1 vote
I am not certain what you are asking.
2 Comments
Rafael Inarejo
on 5 Apr 2022
Star Strider
on 5 Apr 2022
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Jan
on 5 Apr 2022
0 votes
This cannot work. To get the y value of the line, you do have to perform a cumulative sum. There is no chance to avoid this calculation and I do not see a reason, why to avoid this.
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!