필터 지우기
필터 지우기

Replacing a row with another one

조회 수: 93 (최근 30일)
Sabbas
Sabbas 2012년 7월 2일
댓글: Yuval Froman 2019년 8월 10일
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
Sabbas
Sabbas 2012년 7월 2일
thank you
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