File Exchange

image thumbnail

shift

version 1.0.0.0 (5.03 KB) by John T. McCarthy
SHIFT a row or column RELATIVE to the other elements in a MATRIX.

4 Downloads

Updated 29 Aug 2008

View License

Editor's Note: This file was a File Exchange Pick of the Week

Directory contents:

readme.txt
shiftl.m
shiftr.m
shiftu.m
shiftd.m

This set of files was developed using MATLAB Version 5.2.0.3084

Sometimes it is required to SHIFT a row or column RELATIVE to the other elements in a MATRIX. For a VECTOR, it may be necessary to shift the elements across, up or down the line.

With these files, a row can be moved to the left or right. The vacated spaces can be filled with zeroes or the removed elements can be wrapped around. A column can be moved up or down. The vacated spaces can be filled with zeroes or the removed elements can be wrapped around.

SHIFTL moves left, SHIFTR moves right, SHIFTU moves up, SHIFTD movesdown.

Comments and Ratings (8)

Excellent, thanks

Philip

Saved my life!!!!! Nice work. Exactly what I was looking for.

Idillus

Nice and usefull

Sahin Aktas

Robert Nincevic

Michael Foley

Very slick! Much appreciated.

Updates

1.0.0.0

Change category to 'Matrix Manipulation'

modifying description

MATLAB Release Compatibility
Created with R10
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags