1 | initial version |
You can define trigonometric functions via exp()
as:
matsin = lambda M: ((I*M).exp() - (-I*M).exp())/2/I
matcos = lambda M: ((I*M).exp() + (-I*M).exp())/2
For logarithm, please see this Q&A: https://math.stackexchange.com/q/3116315
2 | No.2 Revision |