Reputation: 17617
I would like to know which programming languages can be called by matlab.
for example I am quiet sure that matlab can use C function and maybe java.
I need this stuff for an industrial project so I need something that works well. For example I have found some tutorial to call python function in matlab but they look to me not very good and stable solution.
I am not an expert of the field and my knowledge of matlab is very limited. So please be patience with the answer.
This project is related to machine learning and the software will probably run on a cluster.
EDIT according to this post Embedding Python in MATLAB seems that there are problem when importing numpy using python. The only reason to use python in this environment is the numpy library. Without that it is almost useless to me.
Do you think that I will encounter similar problem using java or c calling some mathematics libraries?
Upvotes: 1
Views: 115
Reputation: 11
I'm not sure about programming language but You can do it by EXE file by running run('C:\someCompiledProgram.exe') And if you need result you can use: [status, result] = system('command')
You can read about it here: http://nf.nci.org.au/facilities/software/Matlab/techdoc/ref/system.html
Upvotes: 0
Reputation: 11037
There are two main methods to achieve this:
Both methods require good understanding of what you are doing, although I would argue that writing MEX function is much harder then referencing an existing library.
Upvotes: 1
Reputation: 36710
Most interfaces are listed here:
http://www.mathworks.de/de/help/matlab/external-interfaces.html
For Python I see different solutions:
Besides the documented limitations, I don't see any problem with these solution. If you are familiar with C or Matlab, I would choose the second or third option. This allows you to write a wrapper to access python with a very fundamental knowledge of matlab.
Upvotes: 2