帮助中心帮助中心
由空白字符组成的字符数组
自 R2021b 起
blanks(n)
示例
blanks(n) 创建一个由空白字符组成的 1×n 数组。将返回值与 string 运算符结合使用,创建一个由 n 个空格组成的字符串。
n
1
string
注意
使用 C 语言作为动作语言的 Stateflow® 图不支持 blanks 运算符。
blanks
全部展开
创建包含五个空格的字符串。
str = string(blanks(5));
在 R2021b 中推出
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office