On 6/11/07, somebody wrote:
> > That's the correct behavior.  You're setting the "x" in Maple, not
> > the variable x in SAGE.  To set x in SAGE you would do
> >  sage: x = maple('5')
> > To see that x was set in maple, do
> >  sage: maple.eval('x')
>
>
> and
> sage: matlab('x = 5')
> doesn't set the SAGE x or the matlab x but rather the python x?

The "SAGE x" is the matlab x.  But

 sage: matlab('x = 5')

should be an error.   In general, for any interface R or object
R in almost all of SAGE, you do
   x  = R(foo)
to make an element of R.  In particular, to make an object
in a particular math software program such as maple or mathematica,
you do
   x = R(foo),
where foo is often a string and R is maple or mathematica.

You can also just evaluate a line of code in the math software program,
which is what .eval does, e.g.,
    matlab.eval('x = 5')
is exactly as if you type "x = 5" into the matlab interpreter (in fact,
that's exactly what happens).

This may be confusing, but it's systematically the case throughout all
SAGE and with all interfaces.

> Sorry, I'm getting a bit confused!

You might want to look at the numerous examples in the reference
manual:

http://www.sagemath.org/doc/html/ref/node125.html

and

http://www.sagemath.org/doc/html/ref/module-sage.interfaces.maple.html



>
> For now I'm not worried about maple though and think I have enough going to
> say something about matlab.
>
> One more question though:  should  plot(x,y) in a %matlab cell work?
>
> Thanks,
>    Randy
>
>
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://www.williamstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to