Creating an Concatenated Array for one word

Hi there. I am trying to create a 4 x 5400 concatenated array where each element of the array contains the same word, something like this screenshot below. Can anyone help me on how to achieve this.

Respuestas (1)

Star Strider
Star Strider el 31 de Mzo. de 2021

0 votos

Use the repmat function.

4 comentarios

Manav Atwal
Manav Atwal el 31 de Mzo. de 2021
I've tried this and it gives me a cell instead of cat?
If the original was a cell array, it will produce a cell array output.
Experiment with these options:
cv = 'Driver A ';
A = repmat(cv, 3, 4) % With Character Vector
sv = "Driver A";
A = repmat(sv, 3, 4) % With String Variable
.
Manav Atwal
Manav Atwal el 31 de Mzo. de 2021
Here is my code here. How do i get the orginal into a cat format?
Star Strider
Star Strider el 31 de Mzo. de 2021
‘How do i get the orginal into a cat format?’
I have no idea what you are asking.
To the best of my knowledge, there is no such thing as ‘cat format’.

Iniciar sesión para comentar.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 31 de Mzo. de 2021

Comentada:

el 31 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by