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!