Attempt to do matrix series summation
Respected Professor Macdonald, thank you for bringing us OctSymPy, which is very great! Here are some issues it is wished to file:
A=[1,2,3;2,1,4;3,5,1] syms n B=symsum(A^n/sym('n!'),n,0,inf)
Matrix series summation it is. The Octave responds as:
error: mpower: not implemented; sympy says: Only integer and rational values are supported error: called from: error: /Users/bbbear2002/octave/octsympy-0.1.0/@sym/mpower.m at line 62, column 7 error: evaluating argument list element number 1
I am on a MacBook Pro Retina late 2012, running Mavericks with Octave 3.8.0.
Thanks!
I also filed issue #100 for the component-by-component case. See also upstream https://github.com/sympy/sympy/pull/7563.
See also #101.
Your invaluable effort on OctSymPy is gratefully appreciated, thank you!
Hi again, i think this is solved, actually mpower supports matrix, actually i can run the test code, but you know, it takes his time.
Even before the symsum, it would be nice here if we go something like:
>> q = python_cmd('return sp.MatPow(_ins[0],_ins[1])', A, n)
q = (sym 3×3 matrix expression)
n
⎛⎡1 2 3⎤⎞
⎜⎢ ⎥⎟
⎜⎢2 1 4⎥⎟
⎜⎢ ⎥⎟
⎝⎣3 5 1⎦⎠
>> B = q / factorial(n)
B = (sym 3×3 matrix expression)
n
⎛⎡1 2 3⎤⎞
1 ⎜⎢ ⎥⎟
──⋅⎜⎢2 1 4⎥⎟
n! ⎜⎢ ⎥⎟
⎝⎣3 5 1⎦⎠
Then there is some hope that symsum would give expm(A) (but I don't think it does at the moment).
Our mpower does not use MatPow explicitly. I wonder if something like doit(MatPow(A, n)) would be better than **?