Filling an array with the same words.

9 views (last 30 days)
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.

Accepted Answer

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

More Answers (0)

Categories

Find more on Cell Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!