MATLAB Answers

help!! not using repmat()

3 views (last 30 days)
hjo
hjo on 22 Jun 2020
Edited: Matt J on 22 Jun 2020
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 Comment

madhan ravi
madhan ravi on 22 Jun 2020
Why not just admit it’s a homework?

Sign in to comment.

Accepted Answer

Matt J
Matt J on 22 Jun 2020
Edited: Matt J on 22 Jun 2020
Another option would be,
kron(ones(row,col),arr)

  0 Comments

Sign in to comment.

More Answers (0)