How to import dates so that MatLab sees them?
1 view (last 30 days)
Show older comments
Ekaterina Serikova
on 14 Jun 2016
Answered: Star Strider
on 14 Jun 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!
0 Comments
Accepted Answer
Star Strider
on 14 Jun 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)
0 Comments
More Answers (0)
See Also
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!