How to import dates so that MatLab sees them?

1 visualización (últimos 30 días)
Ekaterina Serikova
Ekaterina Serikova el 14 de Jun. de 2016
Respondida: Star Strider el 14 de Jun. de 2016
Dear all, I know that that problem was widely discussed, but still none of the previous solutions work for me (( I have a table with column A consisting of the dates(please see Excel attached). When I import the table into MATLAB using:
[dates,big]=xlsread('ExcelName','Big','A2:AIF71'), I get 2 strange arrows with 54 rows...
Could you please help me in importing the table so that MATLAB interprets the date column properly?
Thanks a lot!

Respuesta aceptada

Star Strider
Star Strider el 14 de Jun. de 2016
This works for me:
ExcelName = 'Ekaterina Serikova error.xlsx';
% [dates,big]=xlsread(ExcelName,'Big','A2:AIF71'); % Worksheet 'Big' Does Not Exist In Your File
[dates,big]=xlsread(ExcelName,'A2:AIF71');
DN = datenum(big); % Using ‘datenum’
DN_Check = datevec(DN(1:5))
DT = datetime(big); % Using ‘datetime’
DT_Check = DT(1:5)

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by