Loading CSV file (date column A, identifier row, rest data)

1 回表示 (過去 30 日間)
Oli
Oli 2016 年 3 月 15 日
コメント済み: Oli 2016 年 3 月 24 日
I want to Import the attached csv with following Code: >> d = dbload('data_US.csv');
If I then check for the variable d, it shows correctly 13 fields, but each of the fields contains only NaN's
Thank you very much
  4 件のコメント
Star Strider
Star Strider 2016 年 3 月 16 日
There are several options: xlsread, textscan, readtable and others.
Oli
Oli 2016 年 3 月 24 日
Thank you very much!

サインインしてコメントする。

採用された回答

Daniel LaCroix
Daniel LaCroix 2016 年 3 月 16 日
There is a function called csvread that should load the file.
If your file has headers (or anything other than numbers), the command won't work. To get around this, set it to have an offset of one row (and no column offset).
data=csvread('data_US.csv') or data=csvread('data_US.csv',1,0)
You can also select a more specific range of data if you need to, so check out the documentation if that's something you want to do.
  1 件のコメント
Oli
Oli 2016 年 3 月 24 日
Thank you very much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by