Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168754
Image: ubuntu2004
a=matrix(RR,3,4,[36,51,13,33,52,34,74,45,0,7,1.1,3]) a
[ 36.0000000000000 51.0000000000000 13.0000000000000 33.0000000000000] [ 52.0000000000000 34.0000000000000 74.0000000000000 45.0000000000000] [0.000000000000000 7.00000000000000 1.10000000000000 3.00000000000000]
a.echelon_form()
[ 1.00000000000000 0.000000000000000 0.000000000000000 0.277223183614433] [0.000000000000000 1.00000000000000 0.000000000000000 0.391920861637007] [0.000000000000000 0.000000000000000 1.00000000000000 0.233230880491774]
T = matrix(2,[.97,.05,.03,.95]) T
[ 0.970000000000000 0.0500000000000000] [0.0300000000000000 0.950000000000000]
population=vector([50,200])
T*population
(58.5000000000000, 191.500000000000)
T^2
[ 0.942400000000000 0.0960000000000000] [0.0576000000000000 0.904000000000000]
T^2*population
(66.3200000000000, 183.680000000000)
T*T*population
(66.3200000000000, 183.680000000000)
T^3*population
(73.5144000000000, 176.485600000000)
T^10*population
(110.096226738739, 139.903773261261)
T^100*population
(156.224583738317, 93.7754162616819)
pop200=T^200*population
pop200
(156.249993920127, 93.7500060798709)
T*pop200
(156.249994406517, 93.7500055934811)
list_plot?
list_plot([(T^k*population)[1] for k in [0..200]])+list_plot([(T^k*population)[0] for k in [0..200]])
line([(k,(T^k*population)[1]) for k in [0..50]]) + \ line([(k,(T^k*population)[0]) for k in [0..50]])
T.change_ring(RDF).eigenvalues()
[1.0, 0.92]
T.change_ring(QQ).eigenvectors_right()
[(1, [ (1, 3/5) ], 1), (23/25, [ (1, -1) ], 1)]