plotting x axis with matched array numbers.
Ältere Kommentare anzeigen
PDOP=[1.31;1.33;1.26;1.27;1.29;1.30;1.30;1.29;1.25;1.35;1.24;1.25;1.42];
time_array=[3 23 30;3 23 45;4 0 0;4 0 15;4 0 30;4 0 45;4 1 0;4 1 15;4 1 30;4 1 45;4 2 0;4 2 15;4 2 30];
time_format=duration(time_array,'Format','hh:mm:ss'); % days:hour:minute
figure(1)
plot(time_format,PDOP,'c','LineWidth',1.75)
when I plot the data, how can I show only time_format numbers on the x-axis instead of other intervening numbers?
4 Kommentare
Adam
am 12 Jan. 2017
What do you mean by 'other intervening numbers'? When I run your code I just get time numbers on the x-axis. 03:50 shows up as 03:49:59, but apart from that I don't see anything obviously wrong.
sermet
am 12 Jan. 2017
Walter Roberson
am 12 Jan. 2017
Which MATLAB version are you using? There were relevant changes in recent releases.
In R2016b the only numbers I see on the X axis are in the format you indicate you want.
sermet
am 12 Jan. 2017
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu App Building finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!