Create copies of each row of an array

2 Ansichten (letzte 30 Tage)
Thomas Hoyle
Thomas Hoyle am 30 Nov. 2016
Bearbeitet: Andrei Bobrov am 30 Nov. 2016
Is there a way to copy each row of an array one after another for example if I had
A =
1 2 3 4
5 6 7 8
how can I make it into
A =
1 2 3 4
1 2 3 4
5 6 7 8
5 6 7 8

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 30 Nov. 2016
Bearbeitet: Andrei Bobrov am 30 Nov. 2016
kron(A,[1;1])
or
repelem(A,2,1)

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by