MATLAB Answers

Repeat 3-D array elements

1 view (last 30 days)
Naina
Naina on 12 Dec 2019
Answered: Star Strider on 12 Dec 2019
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.?

  0 Comments

Sign in to comment.

Accepted Answer

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

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.