I want to split a single 3D matrix into 3 smaller 3D matrices such that elements between any two planes are contained in a corresponding smaller matrix. These planes intersect at 120 degrees to each other at the center as given in the image. Let's say any arbitrary example in the figure I drew. AOPQRDA is one of the regions formed between the intersecting planes AORD and OPQR. There are 3 such regions in total. I want all the elements within each region contained in a separate matrix. Is it possible? The splitting is not based on the element value, but the index they are located in.
I started with any random 3D matrix since all it matters here is the index. We can choose any arbitrary center too. Those elements whose indexes meet the certain crietrion should be placed in one section. I haven't been able to come up with a logical planning. Any help is appreciated.Thank you