How to import dates so that MatLab sees them?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2016-6-14
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!