Hello, On Fri, Feb 13, 2009 at 2:36 AM, acd <[email protected]> wrote: > When I try the following in Sage, it fails because leading zeros in > the vector are skipped:
The leading zeros aren't skipped -- the trailing ones are. For example, sage: R.<x> = GF(2)[] sage: list(x^4+x^3+1) [1, 0, 0, 1, 1] The i^th entry in the list corresponds to the coefficient of x^i. 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] --Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
