Home Manual Packages Global Index Keywords Quick Reference | # functions in fft.i - r
roll |
                 roll(x, ljoff, rjoff)
              or roll, x, ljoff, rjoff
     	 or roll(x)
     	 or roll, x

         "rolls" selected dimensions of the array X.  The roll offsets
         LJOFF and RJOFF (both optional) work in the same fashion as the
         LJDIR and RJDIR arguments to the fft function:
            A scalar LJDIR (and nil RJDIR) rolls all dimensions of X by
            the specified offset.
    	Otherwise, the elements of the LJDIR vector [ljoff1, ljoff2, ...]
    	are used as the roll offsets for the first, second, etc.
    	dimensions of X.
    	Similarly, the elements of the RJDIR vector [..., rjoff1, rjoff0]
    	are matched to the final dimensions of X, so the next to last
    	dimension is rolled by rjoff1 and the last dimension by rjoff0.
    	As a special case (mostly for use with the fft function), if
    	both LJDIR and RJDIR are nil, every dimension is rolled by
    	half of its length.  Thus,
    	   roll(x)
    	it equivalent to
    	   roll(x, dimsof(x)(2:0)/2)
         The result of the roll function is complex if X is complex, otherwise
         double (i.e.- any other array type is promoted to type double).  If
         roll is invoked as a subroutine, the operation is performed in place.

    interpreted function, defined at i0/fft.i   line 254
SEE ALSO: | fft