MATLAB: Repeat every element in matrix matricesmatrix arraymatrix manipulation Dears, I have a matrix A(3200,3), I want to repeat each element (not repeat the matrix)in this matrix 200 times. Thank you Best Answer A = reshape(repmat(A(:)',200,1),[],3);This repeats the elements in the columns. If you want to repeat the along the rows do this: A = reshape(repmat(reshape(A',[],1),1,200)',[],size(A,1))';(Corrected) Related SolutionsMATLAB: Reshape 3d to 2d array squeeze()transpose() MATLAB: Edit-merging the values so?for j1 = 1:size(A,1) fprintf(['combinations ',num2str(j1),' = ',mat2str(combinations(:,:,j1)),'\n']); end Related QuestionVector operationsReplicate values of a vectorCreating a N-Dimentional matrix from a 2 Dimentional matrixHow to create a matrix from for loop resultRepeat 3D matrix in 4DCreating a matrix by expanding a row
Best Answer