MATLAB: Convert matrix size from 1xmxn to mxn squeeze I want to compare two matrices. One's size is mxn and the other matrix size 1xmxn. How can I convert 1xmxn to mxn?? Best Answer Z = randi(250,1,3,4); % your matrixone wayout = squeeze(Z)';otherout = permute(Z,[3 2 1]);orout = reshape(Z,size(Z,2),[])'; Related QuestionInitialize a multidimensional matrixHow to convert from cell array to multidimensional arrayHow to convert a 1x1x50 matrix to a vectorAdding zeros to a matrix to match the dimensions of two matrices.Return value of rgb2gray
Best Answer