This seems to work
r = matrix(CallableSymbolicExpressionRing((theta,)), cos(theta/2)*s0 - 
I*sin(theta/2)*sy)

Are there other possibilities?

Le jeudi 19 mai 2016 10:36:22 UTC+2, Alberto Verga a écrit :
>
> I want to define a matrix valued function: what is wrong with this code?
>
> s0 = matrix([[1,0],[0,1]])
> sy = matrix([[0,-I],[I,0]])
> r(theta) = cos(theta/2)*s0 - I*sin(theta/2)*sy
>
> r(1) does not evaluate to r(theta=1)
>
> Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to