Is there any way to call python in r2014a ?

5 views (last 30 days)
I have read different resources which explain that python is supported by r2014b and newer versions. I have only the license of r2014a.
Is there any way to call python script from r2014a ?

Accepted Answer

saad essahli
saad essahli on 24 Jul 2019
Edited: saad essahli on 24 Jul 2019
I found a way out. I used matlab function dos() to execute python scripts as well as functions and get results back to matlab using one line. Try to have look at example below.
i.e. matlab -> OS command line -> python script/function.
dos() function returns the python results to matlab.
Example:
test.m
def test_func(a, b):
print('a/b =',a,'/',b);
Then back to matlab:
>> [status,cmdout] = dos('python -c "from test import test_func; test_func(20,20)" ')
It's still not efficient for time consuming applications. still look for an efficient strategy..

More Answers (0)

Products


Release

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!