dlmwrite関数で列ベクトルをテキスト出力する際、列サイズが大きいと途中で改行されてしまう。
조회 수: 3 (최근 30일)
이전 댓글 표시
dlmwrite関数を用いて1行5000列ほどの列ベクトルをtxt出力したいのですが、 出力されたtxtファイルが途中で改行されてしまいます。 回避する方法はありますか?
dlmwrite('hoge.txt', hoge, 'delimiter', ' ', 'precision', '%.6f', '-append');
댓글 수: 0
채택된 답변
michio
2017년 8월 9일
例えば下記のように 1行10000列のデータを hoge.txt に書き出してみましたが、数値データ自体は 1行に収まっていました。
hoge = rand(1,10000);
dlmwrite('hoge.txt', hoge, 'delimiter', ' ', 'precision', '%.6f', '-append');
このコマンドでも途中で改行されますか?
댓글 수: 0
추가 답변 (2개)
Jiro Doke
2017년 8월 10일
出力された txt ファイルをどのように確認してますか?Windowsのメモ帳だと恐らく表示する幅に限度があるみたいです。

でも Notepad++ で開くとちゃんと 1 行になってます。

댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 一般の演算에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!