MATLAB: Conversion of 4D array to a 2D array

4d array into a 2d array

I have 4D array E1 = E(13,1,8:20,1:800), and would like to convert it into a 2D array. The E1 displays the output as: val(:, :, 1, 1) = …. val(:, :, 2, 1) =….. …………………. …………………. val(:, :, 13, 800)=….. Now, I would like to generate a 2D output with 1:800 in rows and 8:20 in columns.

Best Answer

squeeze(E1)