#6720: make it easy to use sage from matlab
-------------------------+--------------------------------------------------
Reporter: was | Owner: was
Type: enhancement | Status: new
Priority: major | Milestone: sage-wishlist
Component: interfaces | Keywords:
Reviewer: | Author:
Merged: |
-------------------------+--------------------------------------------------
From Josh Kantor
{{{
It was easier to work on a matlab python bridge just writing pure python
C/api code. I have a file matpy.c in my home directory on sage.math.
On sage.math if you start matlab and do
>> mex -g -I/usr/local/sage/local/include/python2.5 matpy.c
/usr/lib/libpython2.5.so.1
Then you can do
>> matemb(pythonfilename, pythonfunc, v1,v2,...,vn)
The function pythonfunc in pythonfilename will be called with arguments
v1,v2,..,v_n which are matlab matrices or vectors, converted to python
lists of lists.
Before starting matlab you may need to do
export PYTHONPATH= <current directory path>
to make sure it sees files in the current directory.
Currently it doesn't process return values and of course its just a
prototype.
Josh Kantor
}}}
Including at an example or something based on the above could be very
useful for some people.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6720>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---