Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 2016-11-15 04:58:32 -0600

Nbb gravatar image

How to extract 'row' of element from a 3D mat ?

I have an array of 48 matrices, each of size 49 x 49. I can merge them to form a 3D cube of size 48 x 49 x 49. How can I extract a 'row' of elements along the 3rd dimension to form a vector of 48 elements? I have tried using a for loop but I was wondering if there is a more elegant way of doing it. The Mat.col or Mat.row function only applies in 2D