How can I pull out one 2D matrix from a 3D matrix if I don't know the size of the 3D matrix?
For example in MATLAB the syntax would be something like:
slice = 3Dmatrix(:,:,1);
This would pull the first slice from the 3D matrix and make it a new variable called slice. It wouldn't matter what the size of slice is, it would automatically snap to the size of the 3D matrix.

How would I do this in VBA?

Also, does a 3D matrix have to be the same dimensions for every slice in the matrix or can they all be different sizes?

Thank you,

Matt.