Plot Excel data for dates and time

9 visualizaciones (últimos 30 días)
Lauren Kilgore
Lauren Kilgore el 25 de Nov. de 2019
Respondida: Pratheek Punchathody el 19 de Nov. de 2020
I am trying to plot a trend/ line graph for the data I attached. If possible, I would like to have graphs for each date.
  2 comentarios
Star Strider
Star Strider el 25 de Nov. de 2019
There are no data in the file you posted, only a list of dates.
Using:
T = readtable('hekp.xlsx','ReadVariableNames',0);
the first five rows are only:
Var1 Var2 Var3
__________________ _________ _______
11/8/2019 08:54:00 11/8/2019 0.37083
11/8/2019 08:58:00 11/8/2019 0.37361
11/8/2019 09:02:00 11/8/2019 0.37639
11/8/2019 09:25:00 11/8/2019 0.39236
11/8/2019 09:25:00 11/8/2019 0.39236
Note that ‘Var3’ are fractional days corresponding to the times in ‘Var1’.
Lauren Kilgore
Lauren Kilgore el 25 de Nov. de 2019
Thank you! I will try to find the frequency and go from there.

Iniciar sesión para comentar.

Respuestas (1)

Pratheek Punchathody
Pratheek Punchathody el 19 de Nov. de 2020
You could import the excel file into the MATLAB workspace and use “readtable()” function to read the imported data. Line graphs can be created using the “plot()” function.
T = readtable('hekp.xlsx'); %Read imported table from the workspace
plot(T.Var1, T.Var3); %ploot Var1 with respect to x-axis and Var3 with respect to y-axis
Refer to the documentation of Read Spreadsheet Data into Table for further reference and parse the data from the table as required.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by