Create copies of each row of an array

조회 수: 1 (최근 30일)
Thomas Hoyle
Thomas Hoyle 2016년 11월 30일
편집: Andrei Bobrov 2016년 11월 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