Grocer Function

NAME

shiftr - mimics gauss function shiftr

CALLING SEQUENCE

[matout]=shiftr(matin,shifts,val)

PARAMETERS

Input

Output

DESCRIPTION

Function that mimics gauss function shiftr: shifts rows of a matrix according to a vector of shifts and fills the holes with a prespecified value.

EXAMPLE

A = matrix([1:15],3,5);B=shiftr(A,[2 3 -2],0)

Example gives the matrix:
B  =
!   0.    0.     1.     4.    7. !
!   0.    0.     0.     2.    5. !
!   9.    12.    15.    0.    0. !

AUTHOR

Eric Dubois 2004