How do I select particular data from excel file

2 visualizaciones (últimos 30 días)
Debayan Mandal
Debayan Mandal el 4 de Dic. de 2018
Comentada: Debayan Mandal el 4 de Dic. de 2018
I have an excel file with 2 colum title namely date and time , value. I want each date 14:30 value only. Is it possible to do so?
thanks in advance

Respuesta aceptada

Kevin Chng
Kevin Chng el 4 de Dic. de 2018
Editada: Kevin Chng el 4 de Dic. de 2018
Yes. Try
a = readtable('test.xlsx');
b = a((hour(a.Date_Time)==14 & minute(a.Date_Time)==30),:)
Use logic to get the index of a when hour is 14 and minutes is 30.
Accept my answer if it is working for you.
  2 comentarios
madhan ravi
madhan ravi el 4 de Dic. de 2018
+1 nice
Debayan Mandal
Debayan Mandal el 4 de Dic. de 2018
thank u it works perfectly.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by