text alignment while writing to text files
1 回表示 (過去 30 日間)
古いコメントを表示
hi, i want to write data of a patient to the .txt file but the data is not aligned(columns alignment). i want text to be displayed like in a table:
Date/Time Results Comment
Mon,3/12/10,12:00 127 before meal
tue,4/11/10,12:51 120 after meal
how can i do this? waiting for kind help Thanks
0 件のコメント
採用された回答
Walter Roberson
2011 年 4 月 18 日
Compare:
sprintf('%10s%10s', 'hi', 'there')
sprintf('%-10s%-10s', 'hi', 'there')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!