MATLAB: Converting a 4d vector to 2d vector machine learningmatrixvector Dear I would like to convert the following 4d vector to a 2d vector. input: Y(:,:,1,1)=0 Y(:,:,2,1)=1 Expected output: Y1(1,1)=1 Y1(1,2)=2 Thanks, Best Answer Y = randi(10,1,1,3,4) Y2 = squeeze(Y) % remove singleton dimensionshelp squeeze Related SolutionsMATLAB: How to convert the 1D matrix into 2D matrix By using reshape function:A=randi([1 6],1,10); %demo datareshape(A,2,[]) MATLAB: 4D interpolation you could fit a 4D polynomial to the data using polyfitn from the file exchange (<http://www.mathworks.com/matlabcentral/fileexchange/10065-polyfitn>) and use this as the interpolation by evaluating it at your desired points. Related QuestionMatrix[1,1,1,1;-1,-1,-1,-1;1,1,1,1] to vector[1,1,1,1,-1,-1,-1,-1,1,1,1,1]Converting a 2d vector to a 4d vectorMesh along a plane for a 3D vectorMean for 4DConverting 2D Array to 3D4D regressionHow to convert 1d vector into 4d matrixCreating 4D vector inside parfor
Best Answer