enter image description hereHere I have two data sets with time series. I want plot that two data set in one figure by using matlab and I tried to plot it and it's coming as an error. Could you please help me to solve this problem? Here I upload the code:
x={'6:15','9:25 ','11:00 ','13:50 ','16:25','19:00 ','20:00 ','22:05 ','23:40 '}; %time
y=[141 95 149 85 135 63 111 115 287] % values
time_out=datenum(x,'HH:MM'); %convert time to datenum
figure
plot(time_out,y,'.-')
datetick('x','HH:MM')
hold on
x4={'6:58','9:50 ','11:45 ','13:40','15:45','17:40 ','18:35 ','22:15 ','00:08 '}; %time
y4=[116 118 252 142 159 185 162 130 204] % values
out4=datenum(x4,'HH:MM'); %convert time to datenum
figure
plot(out4,y4,'.-')
datetick('x4','HH:MM')
and my graph is not proper also.
datetick('x4','HH:MM')
->datetick('x','HH:MM')
– Anthony