Inserting a row and moving other rows down

조회 수: 30 (최근 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,:)]

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by