Hi all,
I’ve been a Matlab user since I began my undergrad career 9 years ago. I’ve competed in the semi-annual MATLAB contest and placed in the top-50 numerous times. I also do all of my teaching in MATLAB … I’d love to change over to python but that is outside of my control.
I’ve switched virtually all of my research projects over to python due to its object oriented nature … although recent versions of MATLAB are increasing their OO support, but they’re a LONG way off. However, there are numerous toolboxes and functions which don’t have open source python implementations and would be painful to re-implement myself. I’ve mainly sidestepped these issues by using MATLAB to do some preprocessing by hand and then writing the output to a text-file for python importing. This may soon become inadequate as I require more the MATLAB functions to be integrated into running code.
I’ve toyed with the idea of writing text-files and calling MATLAB in command-line mode with the subprocess module. This is amazingly clunky, a pain to debug and impossible to maintain 3 years later. I came across PyMAT a few months ago. After toying around with it for a few hours and I noticed it was also clunky and annoying .. there’s no error reporting, you have to manage your sessions by hand, if your data is anything but double’s your SOL.
Yesterday I stumbled across a google.python.announce for mlabwrap. I’ve played around with it and it is amazingly intuitive for someone experienced with MATLAB and python. It essentially creates a pseudo module which will port data and commands between the MATLAB and python namespaces. If you need to pass around MATLAB structs or objects it can create proxy objects and let you manage those.
I will post a followup after I’ve made a few programs. I do all of my microarray processing in MATLAB and these will make simple test-cases. I also have a lot of legacy code for the “Switch-Like” gene detection that is written in MATLAB that I don’t want to re-write.
If anyone has any experience or suggestions feel free to leave them in the comments.
-Will
[...] I use the mlabwrap, as I discussed here, to interface python with MATLAB I could do a more integrated approach. Nosetest and its plugin [...]