How to Create a hystogram based on a timetable?

2 ビュー (過去 30 日間)
Diego Dranuta
Diego Dranuta 2021 年 3 月 23 日
回答済み: Gargi Patil 2021 年 3 月 26 日
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

回答 (1 件)

Gargi Patil
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

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by