Add two lines to a matrix.

1 visualizzazione (ultimi 30 giorni)
Ricardo Gutierrez
Ricardo Gutierrez il 3 Dic 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

Risposta accettata

Matt J
Matt J il 3 Dic 2019
A=A([1;2;3;3;3],:)

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Prodotti


Release

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by