Create copies of each row of an array

2 次查看(过去 30 天)
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

采纳的回答

Andrei Bobrov
Andrei Bobrov 2016-11-30
编辑:Andrei Bobrov 2016-11-30
kron(A,[1;1])
or
repelem(A,2,1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by