Date = datetime({'2015-12-18';'2015-12-18';'2015-12-18'});
StormDuration = [hours(1);hours(2);hours(12)];
Temp = [37.3;39.1;42.3];
Pressure = [29.4;29.6;30.0];
Precip = [0.1;0.9;0.0];
TT = timetable(Temp,Pressure,Precip,StormDuration,'RowTimes',Date+StormDuration);
>> TT
TT =
3×4 timetable
Time Temp Pressure Precip StormDuration
____________________ ____ ________ ______ _____________
18-Dec-2015 01:00:00 37.3 29.4 0.1 1 hr
18-Dec-2015 02:00:00 39.1 29.6 0.9 2 hr
18-Dec-2015 12:00:00 42.3 30 0 12 hr
>>
plot(TT.Time.StormDuration,TT.Temp,'*-')
hold on
plot(TT.Time,TT.Precip,'x-')
As long as same variable type, can concatenate and plot them together as well...
figure
plot(TT.Time,[TT.Temp TT.Pressure TT.Precip],'*-')
Best Answer