How to assign a string with a value in repmat?

3 visualizaciones (últimos 30 días)
Samuel Davies
Samuel Davies el 15 de Sept. de 2015
Comentada: Samuel Davies el 16 de Sept. de 2015
I have a value, A = -1. I want to use repmat as so:
B = repmat('A',1,2);
but this gives me [A,A] and not [-1,-1] as I want it to. Seems very simple but I cannot get it. Help please. Thank you.

Respuesta aceptada

Walter Roberson
Walter Roberson el 15 de Sept. de 2015
B = repmat(A,1,2)

Más respuestas (0)

Categorías

Más información sobre Matrices and 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