cbm755/octsympy — pull request #104 by cbm755 (2014-09-24 22:22:48+00:00)
Title: experimental support for A^n

See
````
octave:101> A = sym([1 2; 3 4])
A = (sym 2×2 matrix) “MutableDenseMatrix([[Integer(1), Inte…”

⎡1 2⎤
⎢ ⎥
⎣3 4⎦

octave:102> B = A^n
pydebug: Treating unknown sympy as scalar:
B = (sym) “MatPow(ImmutableMatrix([[Integer(1), Integer(2)],…”

n
⎛⎡1 2⎤⎞
⎜⎢ ⎥⎟
⎝⎣3 4⎦⎠

octave:103> 0*B
pydebug: Treating unknown sympy as scalar:
ans = (sym) 0 “ZeroMatrix(2, 2)”
octave:104> subs(B, n, 0)
pydebug: Treating unknown sympy as scalar:
ans = (sym) “MatPow(ImmutableMatrix([[Integer(1), Integer(2)…”

0
⎛⎡1 2⎤⎞
⎜⎢ ⎥⎟
⎝⎣3 4⎦⎠

octave:105> subs(B, n, cos(n))
pydebug: Treating unknown sympy as scalar:
ans = (sym) “MatPow(ImmutableMatrix([[Integer(1), Integer(2)…”

cos(n)
⎛⎡1 2⎤⎞
⎜⎢ ⎥⎟
⎝⎣3 4⎦⎠

octave:106>
````