How to repeat the condition for two matrices having different sizes?
Mostrar comentarios más antiguos
I have two matrices of two different sizes A (61 x 61 x 1085) & B (61 x 61 x 31)
I apply my conditions to first A(61 x 61 x 31) until it reaches to the size of B.
Now I want to repeat the same conditions for next A (61 x 61 x 32:62) until it reaches to the size of B....and so on...upto A(61 x 61 x 1085).
Anyone, thanks in advance.
5 comentarios
Jan
el 25 de Abr. de 2019
What does "applying a condition" mean? You want to repeat which same condition? Why "32:62"? Please edit the question and explain the details.
Jitesh Dadich
el 25 de Abr. de 2019
Jan
el 25 de Abr. de 2019
So you can compare the first block A(:, :, 1:31) with B. You get a logical 3D array as output, which contains a TRUE, if the element is greater. What do you want to do with the result? Do you want an all() or any()? Then how to proceed for the rest of A? 1085 is not a multiple of 31. Please explain exactly, what you want to achieve. The less the readers have to guess, the more likey is a useful answer.
Jitesh Dadich
el 26 de Abr. de 2019
Andrei Bobrov
el 26 de Abr. de 2019
I fixed my answer.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!