Ask Your Question

Tengiz Sharafiev's profile - activity

2018-06-21 22:17:20 +0200 received badge  Notable Question (source)
2016-03-08 08:36:15 +0200 received badge  Popular Question (source)
2011-09-28 09:09:39 +0200 received badge  Nice Question (source)
2011-09-27 23:40:54 +0200 received badge  Student (source)
2011-09-27 23:07:28 +0200 received badge  Supporter (source)
2011-09-27 22:50:38 +0200 asked a question How to get the coefficient of $x^n$ 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]]