galileon wrote: > > That worked great, thanks! Here's the exact code I've used, if it may > help some noobie like myself someday: > > M = matrix([[8,-3,-3],[-3,8,-3],[-3,-3,8]]) > show(M) > O = matrix([[1/sqrt(3),1/sqrt(2),1/sqrt(6)],[1/sqrt(3),-1/sqrt(2),1/ > sqrt(6)],[1/sqrt(3),0,-2/sqrt(6)]]) > OT = O.transpose() > show(O) > show(OT) > show(OT * O) > diag = matrix([[2,0,0],[0,11,0],[0,0,11]]) > show(diag) > D=OT * M * O > show(D) > f = D.apply_map(lambda x: x.simplify_full()) > show(f) > > The important thing I noticed is that D.apply_map() doesn't update D > itself, but must be assigned to a new variable. >
Yes, or you could assign it to D again: D = D.apply_map(lambda x: x.simplify_full()) Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
