
Plotting two different dimensions time series data on the same x-axis
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Monsef Tahir
am 11 Jun. 2019
Kommentiert: Peter Perkins
am 19 Jun. 2019
Hi community
I have two time series vectors e,g x1=24 and x2=0:96. The represent hourly (x1) and quarterly (x2 for 15 min) measurements in time for one day.
I would like to plot the two vectors on the same figure with x-axis as 1:00 am 3:00 am ....... 11:00 pm 12:0o pm.
0 Kommentare
Akzeptierte Antwort
Peter Perkins
am 12 Jun. 2019
>> x1 = rand(1,6); t1 = datetime(2019,6,12,1:6,0,0,0);
>> x2 = rand(1,24); t2 = datetime(2019,6,12,1,(0:23)*15,0);
>> plot(t1,x1,'-o',t2,x2,'-x')

2 Kommentare
Peter Perkins
am 19 Jun. 2019
Use the xlim function, or set the corresponding property of the axes object.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!