dlmwrite 0 to 0.0
2 ビュー (過去 30 日間)
古いコメントを表示
I am using dlmwrite to create two columns in a text file. The first column contains numbers (a=[1:1:100]) and then second column contains zeros (b=zeros(100,1). I then concatenated them and replaced some of the zeros with numbers. When written to a file I need the zeros to display as 0.0 instead of 0. I currently have it written to a .txt file.
0 件のコメント
採用された回答
Walter Roberson
2018 年 6 月 4 日
Use 'precision', '%.1f' for dlmwrite()
2 件のコメント
Walter Roberson
2018 年 6 月 4 日
Sorry, that is not possible with dlmwrite(). You should fopen/fprintf/fclose for that.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!