MATLAB: Convert 3D matrix to 2D matrix. 3d matrix If i have value of x,y,z plane in 3D matrix and i want to change the 3D to 2D array( of each x plain). Best Answer I try to guess from your question:%random 3D arrayA=rand(5,6,7);%extract a 2D matrix from first dimension of Ax=1; % x can be from 1 to 5 in this exampleB=A(x,:,:) 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: Assigning numbers to 3d matrix. t = reshape(1:30,5,3,2)ort = nan(5,3,2);t(:) = 1:30ort = [1;2;3;4;5]+[0,5,10]+reshape([0,15],1,1,[]) Related QuestionConverting 2D Array to 3D
Best Answer