MATLAB: Extracting Matrix/Matrices from a 4D Matrix

dimensionsmatrixmatrix manipulation

Hello Matlab Wizards, Hope everyone is doing well. I need some directions with the most efficient one to extract a matrix or numerous matrices ( 5 by 5 dimension each) from a 4-D Double matrix. This is what I have:
My final matrix, BIG, dimension is : 5 *5 * 14680 * 30 ( so basically 14680 of "5*5" matrices and 30 sets of those).
Suppose I want to extract Matrix A ;number 2941, then it is located in final matrix: A=BIG(:,:,2941,1:30);
is that correct?
Now what If I need to extract numerous matrices from Big, suppose matrix number 5891, 5907,5872, and 5883, so how do I do it taking in consideration that each (5*5) matrix has to be picked 30 times (1:30)?
I did this :
for i=1:30;
Matrix_A(:,:,2941,i)=BIG(:,:,2941,i);
end
I got some strange results ( like many empty 5*5).
Do you think I can stack the extracted matrices horizontally or vertically some how, because I will eventually need to get a specific vector from each (1:5,1) [a "5*1" vector from each extracted matrix).
Please let me know if anyone has a suggestion, and I will try to explain better if not clear. I greatly apprciate the help in advance! Kind Regards

Best Answer

which_to_extract = [2941, 5891, 5907,5872, 5883];
just_those = BIG(:, :, which_to_extract, :);