Running python code in matlab?

I have python code (some functions) and I want to implement it in a larger Matlab program! How can i do this? Any help would be helpful ....

+3
source share
4 answers

You should probably avoid this. Use one or the other - preferably Python. But if you need to use both options, you can try the following:

http://github.com/kw/pymex (scroll down to read)

: . , Windows ( , , win32). Matlab , .

+4

system Python . "", , C. , Python C, DLL Matlab.

P.S. Windows Python Matlab COM

+1

, , pythoncall, , , matlab.

http://www.elisanet.fi/ptvirtan/software/pythoncall/index.html

Otherwise, you will have to interact with Matlab through the shell (a little pain that I know). If you are dealing with large amounts of data and are in an OS where you can easily create a RAMdisk that saves matlab files in ramdisk, and transferring the file name will be one way to get data from matlab to python without undue penalty for performance.

+1
source

There is a library called PyMat . It allows you to call python code from matlab.

-2
source

Source: https://habr.com/ru/post/1738371/


All Articles