#11356: Companion matrix constructor
------------------------------+---------------------------------------------
Reporter: rbeezer | Owner: jason, was
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-4.7.1
Component: linear algebra | Keywords: beginner
Work_issues: | Upstream: N/A
Reviewer: | Author: Rob Beezer
Merged: | Dependencies:
------------------------------+---------------------------------------------
Comment(by ddrake):
Perhaps you should add a little suggestion for converting a symbolic
polynomial to the kind of list this function needs; something like:
{{{
sage: x = var('x'); sympoly = x^3 + 2*x + 5
sage: parent(sympoly)
Symbolic Ring
sage: coefflist = [sympoly(x=0)] + [sympoly.coeff(x^k) for k in
[1..sympoly.degree(x)]]; coefflist
[5, 2, 0, 1]
sage: companion_matrix(coefflist)
...whatever...
}}}
(One might be tempted to use `.coeffs(x)`, but that leaves out zero
coefficients.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11356#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en.