> Instead of using vectors, you should just use the indexing on the > polynomials to extract the coefficients you want: > > sage: matrix([[p[i] for i in range(3)] for p in [x^10%p1, x^11%p1, x^12%p1]]) > [1 0 1] > [1 1 1] > [1 1 0] >
There's also the "padded_list" method, used exactly for getting vectors of a specific length: sage: R.<x> = GF(2)[] sage: f = x^2-3 sage: f.list() [1, 0, 1] sage: f.padded_list(5) [1, 0, 1, 0, 0] sage: p2 = x^5-4*x^2-1 sage: [ ((x^i)%p2).list() for i in range(8,12) ] [[0, 0, 0, 1], [0, 0, 0, 0, 1], [1], [0, 1]] sage: [ ((x^i)%p2).padded_list(p2.degree()) for i in range(8,12) ] [[0, 0, 0, 1, 0], [0, 0, 0, 0, 1], [1, 0, 0, 0, 0], [0, 1, 0, 0, 0]] -cc --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
