You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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).
Cite As
Shalin Mehta (2026). Shift matrix (https://in.mathworks.com/matlabcentral/fileexchange/31840-shift-matrix), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (13.2 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
