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!