Filling an array with the same words.

6 visualizzazioni (ultimi 30 giorni)
Mike Hodny
Mike Hodny il 15 Feb 2018
Risposto: Birdman il 15 Feb 2018
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.

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Cell Arrays in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by