Do a plot of the messages from 24 hours. Hour by Hour

조회 수: 1(최근 30일)
flashpode 2021년 9월 28일
댓글: flashpode 2021년 10월 5일
Hey, so I got a variable of duration that has de time of each message that goes from 00:00:00 to 23:59:59 and I want to make a plot that show me the amount of messages each hour. How could I do it? I made this but I got an error:
Hours_24 = (0:1:23)/24;
The error showed is:
Error using plot
Vectors must be the same length.
  댓글 수: 5
flashpode 2021년 10월 5일
well I've got Time_AIS1 that has the time of all the messages and I want a figure that shows me 24 columns where each column has the mesages that have the same Hour. In total there should be just 24 columns.

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


Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 9월 30일
Easy solution might be this, e.g.:
N = numel(Time_AIS1);
stem(1:N, Time_AIS1), xlabel('Hour'), ylabel('# of messages')


Community Treasure Hunt

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

Start Hunting!

Translated by