% mod1 - Like mod but for ring 1..N instead of 0..N-1
function z=mod1(x,y), z=1+mod(x-1,y);

