How to Create a hystogram based on a timetable?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I have a time table that contains data from 28 days from 3 engines.
I have group them and synchronized them but I am having issues to create an histogram showing hours of engine activity per day. Engine activity is showed by engine load. therefore something like if Engine1Load>0, then engine1 is on. This should be done for the 3 engines and duration should be extracted from Absolute time.
Table looks something like this
Absolute Time Engine1Load Engine2Load Engine3Load
2020-02-18 17:58:11 NaN 40 NaN
2020-02-18 17:58:12 NaN 40 45
2020-02-18 17:58:13 NaN 40 45
2020-02-19 19:20:00 NaN 40 45
2020-02-19 19:20:01 15 40 45
2020-02-19 19:20:02 30 40 NaN
and the histogram would be something like this, in this case this is seconds, I want to do it in hours
Any ideas?
Thanks
댓글 수: 0
답변 (1개)
Gargi Patil
2021년 3월 26일
You can create stacked graphs using bar graphs. You can refer to the following documentation for implementation details: https://www.mathworks.com/help/matlab/ref/bar.html#bthxce9
You can also refer to a similar question on stacked histograms that has been answered: https://www.mathworks.com/matlabcentral/answers/293124-how-to-stack-hist
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Identification에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!