Inserting a row and moving other rows down

22 次查看(过去 30 天)
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 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by