Viny wrote:
>
> On 13 août, 10:47, Viny <[email protected]> wrote:
>> Hi,
>>
>> I have a problem of memory into maxima when it performs a symbolic
>> expression of an hessian matrix. This symbolic expression of the
>> hessian seems to be too big. My sage program is written using python.
>> And i want to compute the hessian matrix with mathematica 6.0 in my
>> sage file.
>> I need to compute symbolic expresstion of the gradient and the hessian
>> with mathematica and after compute the mathématica LinearSolve
>> function to solve hessian^-1*grad.
>> How to make this interface in my .sage?
>> Please help me!!!
>>
>> I have mathematica 6.0 and sage4.0.2 in my linux 64bit system.
>
> This is an example of the function to compute the gradient in
> my .sage, but it doesn't work.
> def grad(f,v):
> return mathematica ( f ).D( [ ' v ',1] )
> The result is {0,0} . I have another problem of format, i don't know
> the command to change { } in () in the mathematica result {0,0}
>
You should be able to just call .sage() on the mathematica object to get
a sage object. I tried it with a few things, though, and it appears
that it is not implemented all the way:
sage: b.sage()
123
sage: b=mathematica([1,2,3])
sage: b.sage()
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
/home/grout/.sage/temp/tiny/13055/_home_grout__sage_init_sage_0.py in
<module>()
/home/grout/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc
in sage(self)
1568 Rational Field
1569 """
-> 1570 return self._sage_()
1571
1572 def __repr__(self):
/home/grout/sage/local/lib/python2.6/site-packages/sage/interfaces/expect.pyc
in _sage_(self)
1554 return
sage.misc.sage_eval.sage_eval(repr(self).replace('\n',''))
1555 except:
-> 1556 raise NotImplementedError
1557
1558
NotImplementedError:
sage:
Thanks,
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
-~----------~----~----~----~------~----~------~--~---