Shift matrix
Versione 1.1.0.0 (13,2 KB) da
Shalin Mehta
Fast and convenient function for shifting a matrix in 2D.
The code uses array indexing to implement shifting of the matrix. It is about 2.5 times faster than using interp2 with 'nearest neighbor' option for shifting of the matrices. Inspiration for optimized array indexing comes from a snippet on circular shift in: "MATLAB array manipulations tips and tricks" guide by Peter J. Acklam (http://home.online.no/~pjacklam).
Cita come
Shalin Mehta (2026). Shift matrix (https://it.mathworks.com/matlabcentral/fileexchange/31840-shift-matrix), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2010b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Scopri di più su Creating and Concatenating Matrices in Help Center e MATLAB Answers
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
