5.0

5.0 | 7 ratings Rate this file 15 Downloads (last 30 days) File Size: 5.03 KB File ID: #53

shift

by John T. McCarthy

 

22 Apr 1998 (Updated 29 Aug 2008)

SHIFT a row or column RELATIVE to the other elements in a MATRIX.

Editor's Notes:

This file was a File Exchange Pick of the Week

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 5.2 (R10)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
05 Sep 2002

This m.file is very good and convinient for my work but unfortunately that when I use it with matrix 2000x2000, my computer is hang. and I don't know how to handle it

09 Nov 2002  
25 Jun 2003 Michael Foley

Very slick! Much appreciated.

26 Nov 2004 Robert Nincevic  
22 Jan 2009 Sahin Aktas  
19 Mar 2009 Idillus

Nice and usefull

28 Jun 2011 Philip

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

Please login to add a comment or rating.
Updates

modifying description

29 Aug 2008

Change category to 'Matrix Manipulation'

Tag Activity for this File
Tag Applied By Date/Time
matrices John T. McCarthy 22 Oct 2008 06:31:05
shift John T. McCarthy 22 Oct 2008 06:31:05
matrix John T. McCarthy 22 Oct 2008 06:31:05
row John T. McCarthy 22 Oct 2008 06:31:05
relative John T. McCarthy 22 Oct 2008 06:31:05
linear algebra John T. McCarthy 22 Oct 2008 06:31:05
column John T. McCarthy 22 Oct 2008 06:31:05
matrix manipulation John T. McCarthy 09 Feb 2009 19:35:44
matrix shift Mathis Tate 03 Mar 2009 21:17:25

Contact us at files@mathworks.com