On Jan 5, 2011, at 07:58 , Santanu Sarkar wrote:

> I define the a matrix M=[x,y,
>                             y,x] where x, y are complex variables.
> Now I want to define another matrix M1 whose elements are conjugate of
> corresponding
> elements of M. For example M1[0,0]=conjugate(M[0,0]).
> How can I do this?

The simplest way to do this is probably
   M.conjugate()

If you're not familiar with working with Python (which is the base language for 
Sage), at the "sage: " prompt, you can type
   foo.[TAB]
and get a list of all "methods" associated with the object "foo".  Sometimes, 
inspection of the list that is provided will give you some hints that will be 
worth trying out.  For example, if "next" is in that list, typing
   foo.next?
will get you (one hopes) an explanation of what the "next" method does, and 
possibly some examples of its use.

Typing
   foo.next??
will get you that plus, possibly, the code that implements the method.

Also, note that the "conjugate" method may not attach to your matrix, depending 
on the details of how you defined M, x, y.

If this doesn't help, let us know.

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
--
Democracy is two wolves and a lamb
   voting on what to have for lunch.
Liberty is a well-armed lamb contesting
   the vote.



-- 
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
URL: http://www.sagemath.org

Reply via email to