dlmwrite関数で列ベクトルをテキスト出力する際、列サイズが大きいと途中で改行されてしまう。
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
dlmwrite関数を用いて1行5000列ほどの列ベクトルをtxt出力したいのですが、 出力されたtxtファイルが途中で改行されてしまいます。 回避する方法はありますか?
dlmwrite('hoge.txt', hoge, 'delimiter', ' ', 'precision', '%.6f', '-append');
0 Commenti
Risposta accettata
michio
il 9 Ago 2017
例えば下記のように 1行10000列のデータを hoge.txt に書き出してみましたが、数値データ自体は 1行に収まっていました。
hoge = rand(1,10000);
dlmwrite('hoge.txt', hoge, 'delimiter', ' ', 'precision', '%.6f', '-append');
このコマンドでも途中で改行されますか?
0 Commenti
Più risposte (2)
Jiro Doke
il 10 Ago 2017
出力された txt ファイルをどのように確認してますか?Windowsのメモ帳だと恐らく表示する幅に限度があるみたいです。
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177758/image.png)
でも Notepad++ で開くとちゃんと 1 行になってます。
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177759/image.png)
0 Commenti
Vedere anche
Categorie
Scopri di più su 一般の演算 in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!