I have a 3d matrix of dimension $11 \times 1000 \times 3$. I need to remove the first 10 rows from all 2D matrix so that the output is $11 \times 990 \times 3$. After that I need to convert it into a 2d matrix such that the dimension becomes $10890\times3$.
1 Answer
$\begingroup$
$\endgroup$
As suggested in the comment, you should use Part
and ArrayReshape
:
(* Create random 3D matrix with dimensions 11 x 1000 x 3 *)
mat = RandomReal[1, {11, 1000, 3}];
Dimensions[mat]
(* {11, 1000, 3} *)
mat2 = mat[[All, 11 ;;, All]];
Dimensions[mat2]
(* {11, 990, 3} *)
mat3 = ArrayFlatten[mat2, 1];
Dimensions[mat3]
(* {10890, 3} *)