function res = getvecs (num, len, win)
    bits = bitget (num, 1:len);
    matr = [];
    for i = 1:len-win+1
        matr(i, :) = shift(bits, i-len+win-1)(1:win);
    endfor
    res = matr;
endfunction
