datastoreによりデータの読み込み
Show older comments
以下のコードで365個テキストファイルを読み込もうとしたら以下のエラーが出てしまいました、プロパティーを変更しなくてはいけないと考えているのですがうまくいかず何かアドバイス頂けると幸いです。 テキストファイルは添付のものと形式(区切り位置など)、データ数全て同じものがTA20040101.txt~TA20041231.txtです。
dsX = datastore ('TA2004*.txt');
dsX.MultipleDelimitersAsOne = true;
dsX.NumHeaderLines = 0;
x = readall(dsX);
y = reshape(x.Var1,10368,[]);
以下エラー
Error using datastore (line 165)
Cannot detect TextscanFormats from file: 'C:\Users\Naoki Ishibashi\Documents\MATLAB\HW3\TA2004\TA20040101.txt'. Specify TextscanFormats when you create the datastore. Verify the Text
Format and Advanced Text Format Properties.
Error in test (line 1)
dsX = datastore ('TA2004*.txt');
2 Comments
Kojiro Saito
on 29 Oct 2016
テキストファイルの添付が無いようなので、お手数ですがもう一度添付していただけますか? おそらくデータの区切りの指定などが必要なのですが、実際にデータを見たほうが早いですので。
Naoki Ishibashi
on 29 Oct 2016
Accepted Answer
More Answers (0)
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!