The great Matlab to Python Bridge


Currently Matlab is undergoing some major changes. While it slept for the past 5 years other programming languages have stepped up to take its place. Python, C++, Java amongst others have become as easy to use and as efficient as Matlab. The current  problem, however, is that not all projects and libraries exist in all these languages. So what happens when you have a great program in Matlab and a great program in Python and you want to tie the two together? Here is my experience this weekend:

Day 1: This will be great. I’ll use the Python C API to call python from Matlab. I’ll save the Python state as a Matlab variable and I can always start up my Python session where I left off.

Day 2: Alright.. maybe not. But let’s just try calling Python from C, I just want to make it work, not have it running efficiently.

Day 3: Ok, clearly Python has a crappy API. Moving to the client/server socket communication approach. Phew.. must it be this hard?