Filling an array with the same words.

4 次查看(过去 30 天)
Hello, I would like to fill a 1 to n array with the same word, but I don't want to have to type it all out.
Ex:
[text, text, text, text]
How can I do this? Thank you in advance.

采纳的回答

Birdman
Birdman 2018-2-15
n=10;
repmat(["text"],1,n)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Cell Arrays 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by