Repeat 3-D array elements

조회 수: 20 (최근 30일)
Joana
Joana 2019년 12월 12일
답변: Star Strider 2019년 12월 12일
Hi
I have a 3-d array x of size 67x960x80. I need to repeat the elements of the array 3 times to make it an array of size 67x960x240. How i can do that.?

채택된 답변

Star Strider
Star Strider 2019년 12월 12일
Use the repmat function:
A = rand(67, 960, 80);
B = repmat(A, 1, 1, 3);
sizeB = size(B)
producing:
sizeB =
67 960 240

추가 답변 (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