dlewriteで単語を一つのセルに複数のセルに分かれてしまう
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
filenemae = 'No.1-1result.,at'
a = 'result.csv';
C = cellstr(filename);
dlmwrite(a,C,'-append');
これでCSVファイルに書き出すと、failenameが複数のセルに分かれてしまいますどうしたらよいでしょうか
0 Kommentare
Antworten (1)
Kazuya
am 13 Jun. 2020
Bearbeitet: Kazuya
am 13 Jun. 2020
dlmwrite だと1文字1文字がコンマ区切りで出力されることは避けられないみたいですね。
R2019a から使える writematrix や writecell 関数にも 'WriteMode' で 'append' が用意されているので、こちらではいかがでしょう。
writematrix(A,filename,'WriteMode','append')
という形で dlmwrite とはファイル名の入力位置が違いますが、
a = 'No.1-1result.,at';
filename = 'result.csv';
writematrix(a,filename,'WriteMode','append')
となります。
a がセル配列であれば writecell 関数を使ってください。
0 Kommentare
Siehe auch
Kategorien
Mehr zu テキスト ファイル finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!