Inserting a row and moving other rows down

31 ビュー (過去 30 日間)
Liam Sullivan
Liam Sullivan 2020 年 1 月 29 日
コメント済み: Liam Sullivan 2020 年 1 月 29 日
I am trying to insert a row of ones as the new 2nd row to my matrix, but i want ot move the other rows down. My matrix is defined as A =
3 7 6 0
8 2 5 0
0 1 9 0

採用された回答

Ajay Kumar
Ajay Kumar 2020 年 1 月 29 日
編集済み: Ajay Kumar 2020 年 1 月 29 日
A = [A(1,:);[1,1,1,1];A(2,:);A(3,:)]
  1 件のコメント
Liam Sullivan
Liam Sullivan 2020 年 1 月 29 日
thank you

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by