필터 지우기
필터 지우기

Plotting data with Matlab

조회 수: 11 (최근 30일)
panagiotis skrempos
panagiotis skrempos 2022년 10월 24일
댓글: panagiotis skrempos 2022년 10월 27일
Hello,
I am having an issue plotting some data. I have some arrays with 40000+ cells that are coming from my gams model which represent hours for some years. For example, I have power production and consumption for a wind park with battery integrated for each hour of 4 years. Is there any way to plot them and have a visible plot with so much data ( because in my case the boxplot or the simple plot did not work really well) ? Because of the problem that I mentioned I am trying to make plots with the mean value per hour, so I have only 24 values from each array and I want to put them all to the same figure but to appear like in the pics that I uploaded. More specifically, I want to plot those values in a way that they are visible, good in presentation(like those below) and at the same time to show that they are part of the equation Pnetwork=Pproduced-Pconsumed+Pwind (all 4 are arrays), so there are some arrays to be plotted that add up and one that is subtracted and I want to show that this (Pproduced-Pconsumed+Pwind) is actually equal to Pnetwork. I tried some code like this below. Any advice on what I can do?plot(mean_pr,'LineWidth',1,'LineStyle','--','Color',[0.1 0.3 0.5]);
area(mean_con,'FaceColor',[0.5 0.3 0.1],'EdgeColor','none','FaceAlpha',0.6);
Thanks for your time in advance.
  댓글 수: 4
dpb
dpb 2022년 10월 25일
편집: dpb 2022년 10월 25일
I already suggested area which is precisely what the LH plot is with the pieces built as per the documentation describing the functionality --
"If Y is a matrix, the plot contains one curve for each column in Y. area fills the areas between the curves and stacks them, showing the relative contribution of each row element to the total height at each x-coordinate."
Hence your columns would need to be made up of the the three components [Pproduced, -Pconsumed, +Pwind] and the plotting function will produce the Pnetwork total automagically as the summation of the three.
I don't know what "I want to show that this (Pproduced-Pconsumed+Pwind) is actually equal to Pnetwork" really means; if they are computed as above there cannot possibly be anything except that the total matches the sum of the components. If you somehow have an independent measure of Pnetwork that is a real system and the other is a model trying to predict that, then that would be another that wouldn't necessarily match, but you didn't indicate having such.
You did not respond to the request to attach some of the actual data; not much else to be done without something to poke at but generalities.
panagiotis skrempos
panagiotis skrempos 2022년 10월 27일
I couldnt send the data but thank you for your detailed answer and your time. I am really grateful!!!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by