以前、行列と文字列を .txt ファイルに含めることについて質問しました。セルを追加する必要があります。私の前の質問から:
str = 'This is the matrix: ';
mat1 = [23 46; 56 67];
fName = 'output.txt';
fid = fopen(fName, 'w');
if fid >= 0
fprintf(fid, '%s\n', str);
fclose(fid);
end
dlmwrite(fName, mat1, '-append', 'newline', 'pc', 'delimiter', '\t');
今、私は文字列を追加したい:
'ABC' [10011] [2]
'DEF' [10023] [1]
関連リンク:
http://www.mathworks.com/help/techdoc/ref/fileformats.html、http://www.mathworks.com/support/solutions/en/data/1-1CCMDO/index.html?solution=1- 1CCMDO