help!! not using repmat()

조회 수: 2 (최근 30일)
gmltn1212
gmltn1212 2020년 6월 22일
편집: Matt J 2020년 6월 22일
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일
Another option would be,
kron(ones(row,col),arr)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by