view test/octave.test/matrix/shift-1.m @ 5301:9302581b820d ss-2-9-2

[project @ 2005-04-22 17:08:07 by jwe]
author jwe
date Fri, 22 Apr 2005 17:09:11 +0000
parents eeb061f9cdbf
children
line wrap: on
line source

a = [1, 2, 3];
b = [4, 5, 6];
c = [7, 8, 9];

r = [a, b, c];
m = [a; b; c];

(shift (r, 3) == [c, a, b]
 && shift (r, -6) == [c, a, b]
 && shift (r, -3) == [b, c, a]
 && shift (m, 1) == [c; a; b]
 && shift (m, -2) == [c; a; b])