Translate/Rotate submatrix

8 visualizaciones (últimos 30 días)
Friend
Friend el 12 de Abr. de 2018
Comentada: Friend el 12 de Abr. de 2018
I have a 512x512x100 matrix A which contains a 100x100x20 submatrix S. I want to translate (and rotate) S. In few words, the final result must be a 512x512x100 matrix containing S, but in a different position (and if possible, rotated). How can I do that?
  4 comentarios
Stephen23
Stephen23 el 12 de Abr. de 2018
  • Translation: depending on your requirements you could use indexing, or circshift. What happens if the new subarray position lies across/outside the array dimensions?
  • Rotation of a array by an arbitrary angle is not clearly defined:
Friend
Friend el 12 de Abr. de 2018
  • It's true, I solved the translation problem through simple indexing.
  • I had a feeling that rotating by an arbitrary angle wouldn't be possible. I'll try with 90° rotations. thanks

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices 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