Shift a square matrix along a bigger square matrix by one
Mostra commenti meno recenti
Let’s say I have a matrix,call it m2 with size of 4x4. I want to shift the matrix by one using for loop.
2 Commenti
KSSV
il 30 Nov 2022
What do you mean by shift the matrix? Any example?
John D'Errico
il 30 Nov 2022
Please give an example. Even the clarification comment you made is highly confusing.
Risposte (2)
Bjorn Gustavsson
il 30 Nov 2022
0 voti
Have a look at the help and documentation for the function circshift. That function should solve the problem you have described.
HTH
If you're forced to do it manually, then there are many examples of sliding window filters on the forum.
You can use padarray for edge padding. See:
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!