Hello every one. I have a 3D matrix of size
every member of this matrix is a random number between 1 to 5 like
I want to subtract each members of matrix A from the 9 overlaying members of it.
but my question is how can i do this procedure for the members that have 4, 5 or 6 overlaying members.
for example member of index (i,j,k)=(1,1,2) that has only 4 overlaying members in z=1 and this code is not useful in this situation because this code working in cases that there are only 9 overlaying members.
In fact for
in all pages from z=2 to z=10 this code is not useful and I am very confused because these members have 4 or 6 overlaying members . with best regards.