Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
matlabで通常のテキストファイルをセル配列に読み込みたいです。どうやってやるの ?
書式設定は必要ありません。リテラルとして読む。
ありがとうございました。
100x1のような行ベースの配列になります
example of reading : dd = {1;2;3}
を使用textscanして、1 行に 1 つのセル要素を含めるには、次のようにします。
textscan
fid = fopen('myFile.ext'); allData = textscan(fid,'%s','Delimiter','\n'); % allData{1} is a nLines-by-1 cell array with the lines of the file as text