MATLAB: Repeat 3-D array elements 3d arraymatrixrepeat elements 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.? Best Answer Use the repmat function: A = rand(67, 960, 80);B = repmat(A, 1, 1, 3);sizeB = size(B)producing: sizeB = 67 960 240 Related SolutionsMATLAB: How i will choose a random element of a matrix One way A = rand(3,4) A( randi([1,size(A,1)],1), randi([1,size(A,2)],1) ) MATLAB: Fprintf repeat fprintf('My results are %.5f and %.5f', f(x)./[1, 2])Hey, it's not a better solution but it meets your requirements. Related QuestionHow to randomly select an element in a matrixFunction repeat numberRepeat rows of matlabHow to perform mathematical operation between all elements of arrays with unequal numbersRepeat elements in matrixRepeat 3D matrix in 4D
Best Answer