How can i convert dates from an imported excel file in order to plot?

1 vue (au cours des 30 derniers jours)
Nathanael Durham
Nathanael Durham le 4 Déc 2019
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

Réponses (1)

Sahithi Metpalli
Sahithi Metpalli le 5 Mar 2020
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')

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by