Plotting time in hours
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have attached a .csv file which I have created containing time running from 21/11/22 - 22/11/22.
I have also attached a copy of the code i am using to load in this data.
I am not sure if the hh:mm time is correct in the .csv file? I want it to run from midnight on 21/11/22 to midnight on 22/11/22 at hourly intervals. For example, 21/11/22 01:00:00, i want this to be 1am.
I want to plot this data as a time series, showing the time in hours on the x-axis.
0 Commenti
Risposte (2)
Florian Bidaud
il 24 Nov 2022
You have one line per hour so you can use directly the line index as your time series and plot the associated variable according to it.
timeSeries = 0:length(excelTime);
plot(timeSeries,variableToPlot)
Seth Furman
il 6 Dic 2022
tt = readtimetable("208cw3_21OC.csv",NumHeaderLines=5,VariableNamingRule="preserve")
stackedplot(tt)
0 Commenti
Vedere anche
Categorie
Scopri di più su Language Fundamentals in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!