text alignment while writing to text files
조회 수: 5 (최근 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!