MATLAB: Converting from 1 x n x 3 to n x 3 convert I have a file with the data as image one. But my code will only work if the data is in a n x 3 matrix (e.g. image 2) Best Answer squeeze(your_matrix)eg: squeeze(1xnx3) gives you nx3 matrix Related SolutionsMATLAB: Going from 1 x n to n x n matrix repmat(A,100,1)where A is your vector. MATLAB: Convert 1X5 to 3X3 Probably more clever ways, butN=3; % number elements to duplicateA=a(1:N); % first rowfor i=2:numel(a)-(N-1) A=[A;a(i:i+N-1)]; % fixed typo of N-2 priorend Related QuestionHow convert an m x n x p image sequence to an m x n x 3 x p sequence efficientlyHow to convert a 1x1x50 matrix to a vectorConvert matrix size from 1xmxn to mxnN(x)How to create a sqaure matrix from a one dimensional vector
Best Answer