I have a high dimensional matrix A, two row vectors ind1 and ind2. The length of ind1 and ind2 is flexible but
length(size(A))==length(ind1)+length(ind2)
is always true. So how can I refer to the element of A whose index is (ind1(1),…ind1(end),ind2(1),…ind2(end))? Since the length of ind1 and ind2 is flexible, I couldn't simply write out every index.
Best Answer