Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Matrix manipulation

1 visualización (últimos 30 días)
Cameron
Cameron el 12 de Feb. de 2012
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi,
I have an array with one value (I.e. dimensions of 1 x 1) and I need to concatenate with other arrays with dimensions (108 x 1).
How do I add the one value to 108 rows? I.e. convert 1 x 1 array to a 108 x 1 array. Thus allowing e to concatenate the arrays.
Thanks, Cameron.

Respuestas (1)

Rick Rosson
Rick Rosson el 12 de Feb. de 2012
Please try:
x = rand(108,1);
a = 5;
x(end+1) = a;
Or:
y = [ x ; a ];
HTH.

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by