Add two lines to a matrix.

3 visualizaciones (últimos 30 días)
Ricardo Gutierrez
Ricardo Gutierrez el 3 de Dic. de 2019
Comentada: Ricardo Gutierrez el 3 de Dic. de 2019
Hello good day.
I have the following matrix
A = [1 1 1 1
         2 2 2 2
         3 3 3 3];
What instruction or how do I add two more lines
equal to the third line, that is, it looks like this
A = [1 1 1 1
         2 2 2 2
         3 3 3 3
         3 3 3 3
         3 3 3 3];
Waiting for your valuable help
Regards

Respuesta aceptada

Matt J
Matt J el 3 de Dic. de 2019
A=A([1;2;3;3;3],:)
  1 comentario
Ricardo Gutierrez
Ricardo Gutierrez el 3 de Dic. de 2019
Excellent !!!!
It worked
Thank you

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Productos


Versión

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by