I would like to chain these two functions: 1. select the third dimension of a m x n x 3 matrix 2. flatten the matrix into a (m+n) x 1 vector
Something like: mat(:,:,1)(:)
or (mat(:,:,1))(:)
But this is not the correct syntax.So how do I chain these two functions together without assigning some variable to the intermediate result mat(:,:,1)
?