How can I subtracting the members of a 3D Matrix ?

3 visualizaciones (últimos 30 días)
mr mo
mr mo el 4 de Dic. de 2016
Editada: mr mo el 8 de Dic. de 2016
Hello every one. I have a 3D matrix of size
every member of this matrix is a random number between 1 to 5 like
from
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
(i,j,k)=(:,1,2)
and
(i,j,k)=(:,end,2)
and
(i,j,k)=(1,:,2)
and
(i,j,k)=(end,:,2)
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.

Respuestas (1)

Image Analyst
Image Analyst el 5 de Dic. de 2016
Use convn() with the proper kernel. But I'm not really sure what you mean by overlaying members and what's going on with the z=1 plane.
  4 comentarios
mr mo
mr mo el 5 de Dic. de 2016
Hi again. if you can get me your Email address then I can email you some pictures that clearly explain what I'm gonna do. With Best Regards.
Guillaume
Guillaume el 5 de Dic. de 2016
Best, is to attach these image in the post rather than emailing them to one single person. That way you can get other people input as well.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by