Using code to import data
古いコメントを表示
I have text files that I am trying to import into MATLAB (sample attached). The text files contain data collected using sensors (named q01, q02 etc.). The first 5 lines are garbage all I really need are the lines of data after q01 and q02 (complete file has more sensors). I have 529 of these files that I am trying to read in so it is not practical to use the import tool each time. I have the file names stored in a structure (field=names). This is the code that I have tried to use to read in the data but it is not extracting all of the data.
delimeterIn=' ';
headerlinesIn=5;
%Imports data and creates a structure with separate fields for numerical
%and text data
for i=1:length(files)
x(i)=importdata(files(i).name, delimeterIn, headerlinesIn);
end
Any help efficiently reading these files in would be appreciated.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で App Building についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!