I have a multidimensional array A that is say NxNxNxNxN. I want to access the NxN 2d array i,j,k,:,:, using the index vector p=[i,j,k]. What is the smart way to pull this out of A, such as A(p,:,:)? I would rather not use squeeze(A(p(1),p(2),p(3),:,:)).
MATLAB: Indexing a chunk of a of a multidimensional array using a vector of indices
indexingMATLAB
Best Answer