How can I insert a tab character in my character array?
조회 수: 21 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2017년 9월 26일
답변: MathWorks Support Team
2017년 9월 29일
I want to insert a tab character in a character array. Is there a function such as 'newline' which adds a tab character instead of a new line character?
채택된 답변
MathWorks Support Team
2018년 5월 24일
As of MATLAB R2017a, there is no function similar to 'newline' which specifically adds a horizontal tab character. However you can use the following workarounds:
1. For adding horizontal tab character
>> sprintf('\t')
2. For adding certain number, say 5, of whitespaces:
>> blanks(5)
3. For a complete list of supported special characters, you can refer to the 'Special Characters' section in the following documentation:
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!