Effacer les filtres
Effacer les filtres

help!! not using repmat()

1 vue (au cours des 30 derniers jours)
gmltn1212
gmltn1212 le 22 Juin 2020
Modifié(e) : Matt J le 22 Juin 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 commentaire
madhan ravi
madhan ravi le 22 Juin 2020
Why not just admit it’s a homework?

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 22 Juin 2020
Modifié(e) : Matt J le 22 Juin 2020
Another option would be,
kron(ones(row,col),arr)

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by