Add two lines to a matrix.

조회 수: 2 (최근 30일)
Ricardo Gutierrez
Ricardo Gutierrez 2019년 12월 3일
댓글: Ricardo Gutierrez 2019년 12월 3일
Hello good day.
I have the following matrix
A = [1 1 1 1
         2 2 2 2
         3 3 3 3];
What instruction or how do I add two more lines
equal to the third line, that is, it looks like this
A = [1 1 1 1
         2 2 2 2
         3 3 3 3
         3 3 3 3
         3 3 3 3];
Waiting for your valuable help
Regards

채택된 답변

Matt J
Matt J 2019년 12월 3일
A=A([1;2;3;3;3],:)
  댓글 수: 1
Ricardo Gutierrez
Ricardo Gutierrez 2019년 12월 3일
Excellent !!!!
It worked
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by