MATLAB Answers

0

converting hourly plot(1:1:168) to days of week starting from Mond to Sund

Asked by Awais Ahmad on 22 Jul 2019
Latest activity Edited by Awais Ahmad on 22 Jul 2019
figure
hour=1:1:168;
[DayNumber, DayName]= weekday(TT2.time(1:24:168), 'short', 'en_US');
plot(hour,T3mean);
ylabel('value')
This my code for plotting T3mean, which is nearly 168 values with the hours having the same vector length. But I want to plot this hours in terms of day name starting from monday to sunday. How can I do that in matlab.
Should I use swtich loop or there is another method of doing this.
I have even used, the below command that gives me a char matrix of 7*3, but I still cannot replace it with my hour vector.
[DayNumber, DayName]= weekday(TT2.time(1:24:168), 'short', 'en_US');
Thank you for your time.

  0 Comments

Sign in to comment.

0 Answers