problem with Read excel file

1 次查看(过去 30 天)
tara es
tara es 2022-10-20
回答: VBBV 2022-10-21
I have an excel file like below.
when I read it using
fid = xlsread('P645.cwu.igs14.csv');
the first column(Date) didnt read and it just give
what is the problem?

回答(2 个)

Marcel Kreuzberg
Marcel Kreuzberg 2022-10-20
xlsread read numeric values by default check out readtable
regards
Marcel
  2 个评论
tara es
tara es 2022-10-20
Thanks, but when I use readtable its problem is the conversion between table & matric. It makes an error for first part.
Marcel Kreuzberg
Marcel Kreuzberg 2022-10-21
after reading the file with readtable (and the 'NumHeaderLines',11 option) you should get an table. the problem is now, that the tirst column 'Date' is not numeric. to get an matrix you have to convert the Date to numeric value first.

请先登录,再进行评论。


VBBV
VBBV 2022-10-21
You can try using a readmatrix function. https://in.mathworks.com/help/matlab/ref/readmatrix.html

Community Treasure Hunt

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

Start Hunting!

Translated by