Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. ClearAll["Global`*"]
  2.  
  3. (* Input Matrix *)
  4. A = {{a, b}, {c, d}}
  5.  
  6. cp = Collect[CharacteristicPolynomial[A, x], x]
  7. cl = CoefficientList[cp, x]
  8.  
  9. ClearAll["Global`*"]
  10.  
  11. (* Input Matrix *)
  12. A = {{a, b}, {c, d}}
  13.  
  14. cp = Collect[CharacteristicPolynomial[A, x], x] // TraditionalForm
  15. cl = CoefficientList[cp, x]
  16.  
  17. ClearAll["Global`*"]
  18.  
  19. (* Input Matrix *)
  20. A = {{a, b}, {c, d}}
  21.  
  22. cp = Collect[CharacteristicPolynomial[A, x], x] //
  23. PolynomialForm[#, TraditionalOrder -> True] &
  24. cl = CoefficientList[cp, x]
  25.  
  26. ClearAll["Global`*"]
  27.  
  28. (* Input Matrix *)
  29. A = {{a, b}, {c, d}}
  30.  
  31. c0 = Collect[CharacteristicPolynomial[A, x], x]
  32. cx = CoefficientList[c0, x] x^Range[0, Exponent[c0, x]]
  33. cp = Replace[Reverse@cx, List[x__] :> HoldForm[Plus[x]]]
  34. cl = CoefficientList[cp, x]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement