How do I plot time intervals in weekdays?

4 vues (au cours des 30 derniers jours)
Asrorkhuja Ortikov
Asrorkhuja Ortikov le 24 Sep 2020
I need to spread time intervals in 24h scale and plot them in each week days? How do I do it? So, the idea is to see how people are behaving over the week. Time intervals are given as st_time (starting time) and end_time in data attached, and the value need to be spreaded over interval is Pevdumb.

Réponse acceptée

Prudhvi Peddagoni
Prudhvi Peddagoni le 28 Sep 2020
Hi Asrorkhuja Ortikov,
You can use T=readtable(filename) function to read the xlsx file into MATLAB.
Then you can retrieve all values that follow a condition like this for example:
T1=T(T(:,3));
This line stores all the rows with mon as the weekday. More information about this here (look in Select Rows with Logical Indexing section).
Then you can use the bar(X,Y) function to plot the graph. More about the bar function here.
Hope this helps.
  1 commentaire
Asrorkhuja Ortikov
Asrorkhuja Ortikov le 29 Sep 2020
that works, thanks a lot!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Calendar dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by