Filling an array with the same words.

9 visualizaciones (últimos 30 días)
Mike Hodny
Mike Hodny el 15 de Feb. de 2018
Respondida: Birdman el 15 de Feb. de 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.

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre Cell Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by