how to make a 12x12 matrix form 4x4:))

조회 수: 3 (최근 30일)
Habib Muhammad
Habib Muhammad 2016년 11월 16일
댓글: Habib Muhammad 2016년 11월 16일
i have a matrix which is 4x4 and i want to putt it in 12x12 matrix at specific points like 1st and 2nd rows and column of 4x4 at at 1st and 2nd rows and column of 12x12 and 3rd and 4th rows and columns of 4x4 at 7th and 8th rows and columns of 12x12 . how can i do that.. i am attaching both the matrices.. Kindly have a look...

채택된 답변

KSSV
KSSV 2016년 11월 16일
Are you expecting something like this?
k = rand(4) ;
m = repmat(k,[3,3]) ;
check m, it will have k four times repeated.
  댓글 수: 3
KSSV
KSSV 2016년 11월 16일
k = rand(4) ;
m = zeros(12) ;
m(1:2,1:2) = k(1:2,1:2) ;
Habib Muhammad
Habib Muhammad 2016년 11월 16일
Thank you i did the same:)

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

추가 답변 (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