ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 11 Feb 2013 20:06:29 -0600Extracting a matrix from linear expressionshttp://ask.sagemath.org/question/9756/extracting-a-matrix-from-linear-expressions/Suppose I have a vector depending on symbolic parameters, say `v=vector([a-b, b-c, c-a])`. How to extract the matrix naturally associated with the vector v ? I mean the matrix M
1 -1 0
0 1 -1
1 0 -1
since `vector([a, b, c]) * M == v`. In fact I need the equivalent to the Maple command **GenerateMatrix**.
Pascal OrtizMon, 11 Feb 2013 20:06:29 -0600http://ask.sagemath.org/question/9756/How to get the coefficient of $x^n$ in symbolic expression of matrixhttp://ask.sagemath.org/question/8350/how-to-get-the-coefficient-of-xn-in-symbolic-expression-of-matrix/I have the symbolic matrix:
x = var('x')
h = Matrix(SR, [[x,2],[3*x+5,4]])
How can I get the coefficients of $x^n$ in symbolic expression of matrix. I need to get the follow two matrix from that one:
[[1,0],[3,0]]
[[0,2],[5,4]]
Tengiz SharafievTue, 27 Sep 2011 15:50:38 -0500http://ask.sagemath.org/question/8350/