Replacing a row with another one

93 次查看(过去 30 天)
Dear all,
I have a cell matrix A and I want to replace the 6th row with another one that I have created
Is there a way to do that?
thanks

采纳的回答

Thomas
Thomas 2012-7-2
is this what you want
a={'1' '2' '3';'4' '5' '6';'7' '8' '9'; 'a' 'b' 'c'; 'd' 'e' 'f'; 'g' 'h' 'i'}
new={'1' '2' '3'} % the row to replace row 6 with
a(6,:)=new % replace row 6 in a with new
  2 个评论
Yuval Froman
Yuval Froman 2019-8-10
is there an option to do this with a row with size smaller than the matrix rows?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by