I am trying to not use repmat() because I want to actually understand what is going on with this...
arr = [a b; c d]
row = 2;
col = 3;
I want to return this value..
new = [a b a b a b
c d c d c d
a b a b a b
c d c d c d]
I feel like I have to use forloop in order to solve this but I dont have a clear idea...

댓글 수: 1

madhan ravi
madhan ravi 2020년 6월 22일
Why not just admit it’s a homework?

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

 채택된 답변

Matt J
Matt J 2020년 6월 22일
편집: Matt J 2020년 6월 22일

0 개 추천

Another option would be,
kron(ones(row,col),arr)

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2020년 6월 22일

편집:

2020년 6월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by