Add two lines to a matrix.

1 回表示 (過去 30 日間)
Ricardo Gutierrez
Ricardo Gutierrez 2019 年 12 月 3 日
コメント済み: Ricardo Gutierrez 2019 年 12 月 3 日
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

採用された回答

Matt J
Matt J 2019 年 12 月 3 日
A=A([1;2;3;3;3],:)
  1 件のコメント
Ricardo Gutierrez
Ricardo Gutierrez 2019 年 12 月 3 日
Excellent !!!!
It worked
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

製品


リリース

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by