datastoreによりデータの読み込み
古いコメントを表示
以下のコードで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 件のコメント
Kojiro Saito
2016 年 10 月 29 日
テキストファイルの添付が無いようなので、お手数ですがもう一度添付していただけますか? おそらくデータの区切りの指定などが必要なのですが、実際にデータを見たほうが早いですので。
Naoki Ishibashi
2016 年 10 月 29 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Text Data Preparation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!