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]]
| 1 | initial version |
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]]
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.