How can i convert dates from an imported excel file in order to plot?
1 次查看(过去 30 天)
显示 更早的评论
I have an excel spreadsheet containing dates in the format (mm/dd/yyy) in the first colum and i am attempting to plot these dates against the values in the 2nd column of my spreadsheet.
However i am having issues with my data, i've tried using 'xlsread' and 'readtable' however with 'xlsread' the first column containing the dates doesn't appear. And with 'readtable' i get an error saying 'too many output arguments'
any help would be much appreciated
回答(1 个)
Sahithi Metpalli
2020-3-5
Hi,
To retrieve the column containing dates using xlsread you could use
[output1 output2 output3] = xlsread('abcd.xlsx')
output1 contains numeric data
output2 contains text data
output3 contains the entire file data
The function readtable read the file data as a table, so use only one output argument
T= readtable('abcd.xlsx')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!